A modern, containerized personal portfolio and web lab built with Next.js, deployed on Google Cloud Run using Terraform and Ansible.
- Frontend: Next.js 16 (App Router), React 18, TypeScript, Tailwind CSS.
- Infrastructure: Google Cloud Run, Artifact Registry.
- IaC: Terraform.
- Orchestration: Ansible, GNU Make.
- Containerization: Docker (Multi-stage builds with non-root security).
Ensure you have the following installed locally:
- Node.js (v20+) & npm
- Docker (Desktop or Colima)
- Terraform (v1.0+)
- Ansible
- Google Cloud SDK (
gcloud) - Firebase CLI (
npm install -g firebase-tools)
make clean-install
npm run devOpen http://localhost:3000 to view it in the browser.
make docker-upThe app will be available at http://localhost:8080.
This project uses Terraform to provision infrastructure (Cloud Run) and Firebase Hosting for the frontend delivery.
-
Authenticate:
gcloud auth application-default login firebase login
-
Deploy Infrastructure (Cloud Run): This runs pre-flight checks, Terraform apply, and health verification for the backend service.
make ansible-deploy
-
Deploy Hosting (Firebase): This deploys the Firebase Hosting configuration, which contains the rewrite rules that point to the Cloud Run service.
make deploy-hosting
| Command | Description |
|---|---|
make up |
Deploy infrastructure via Terraform. |
make down |
Destroy infrastructure and cleanup. |
make clean-all |
Full environment reset (Terraform, Docker, Node). |
make ansible-deploy |
Orchestrate deployment with Ansible. |
make deploy-hosting |
Deploy Firebase Hosting configuration. |