Google Cloud
Two reasonable shapes: Cloud Run with Cloud SQL, or a single Compute Engine VM running Docker Compose.
Cloud Run + Cloud SQL
Section titled “Cloud Run + Cloud SQL”- Create a Cloud SQL for PostgreSQL instance.
- Deploy
docker.io/flexcal/flexcal:devto Cloud Run, container port 3000. - Attach the Cloud SQL instance to the service and set
DATABASE_URLaccordingly. - Set
NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_SECRETandCALENDSO_ENCRYPTION_KEY. - Map a custom domain to the service.
Cloud Run scales to multiple instances, so set SKIP_DB_MIGRATIONS=1 and SKIP_APP_STORE_SEED=1 and
run migrations as a Cloud Run Job on each release.
Compute Engine VM
Section titled “Compute Engine VM”Create the VM
Section titled “Create the VM”In the GCP console, create a project, then a Compute Engine VM instance. Two vCPUs with 2–4 GB of RAM is enough to serve flexcal. Note the public IP.
Open the ports
Section titled “Open the ports”Add a firewall rule allowing ingress on the ports your reverse proxy listens on (80 and 443).
Install Docker
Section titled “Install Docker”Connect to the instance:
gcloud compute ssh --project=<PROJECT_ID> --zone=<ZONE> <INSTANCE_NAME>Install and start Docker:
sudo apt-get updatesudo apt-get install docker.io docker-compose-pluginsudo systemctl enable --now dockerDeploy flexcal
Section titled “Deploy flexcal”Follow the Docker guide: clone the repository for its docker-compose.yml,
fill in .env, and start the stack. Put a TLS-terminating reverse proxy (Caddy, nginx, or a Google
load balancer) in front of port 3000.