This directory contains the source and configuration for migrating mikewyantjr.com from a hosted VM to a containerized application running on Google Cloud Run.
- mikewyantjr.com is served via
caddy:alpineinside a container. - Cloud Run manages the runtime environment, auto-scaling, and SSL/TLS certificates.
- Deployment is automated via GitHub Actions (
.github/workflows/cloud-run.yaml).
public/: The static website content (Webflow export).Dockerfile: Multi-stage build for the static site container.Caddyfile: Caddy configuration with Cloud Run${PORT}support and/pingendpoint..github/workflows/cloud-run.yaml: CI/CD pipeline for building and deploying.archive/legacy-stack/: Contains the originaldocker-compose.ymlandCaddyfilefor reference.
To build and run the container locally:
# Build the image
docker build -t mjw-www ./mjw-webhost
# Run the container (listening on port 8080)
docker run -p 8080:8080 -e PORT=8080 mjw-wwwOnce running, verify at http://localhost:8080/ and http://localhost:8080/ping.
The deployment pipeline triggers on pushes to the main branch that modify files in mjw-webhost/.
- Credentials: Requires a GitHub secret
GCP_SA_KEYcontaining the JSON service account key for a service account inmikewyantjr-devwith Cloud Run and Artifact Registry permissions. - Steps: Authenticate to GCP, build and push to Artifact Registry, and deploy to Cloud Run.
After deployment, follow Google Cloud Run domain mapping instructions:
gcloud run domain-mappings create --service mikewyantjr-www --domain mikewyantjr.com --region us-east1- Update DNS A-records for
@(apex) and CNAME forwwwaccording to Google's provided IPs.
The container exposes a /ping endpoint that returns OK (200). Cloud Run uses this to verify the container is ready.
curl https://<cloud-run-url>/pingLegacy Stack:
The old compose-based setup is archived in archive/legacy-stack/.
docker-compose.ymlCaddyfilescripts/smoke-test.sh(legacy)