deploy via Gitea CI registry; provision GCP infra with Terraform
- Terraform: e2-micro VM (us-east1-b, free tier), static IP, SSH/web
firewall rules, IAM bindings for Firestore + GCS; imports existing
drb-calls bucket and c2-server Firestore database into state
- Gitea CI: build c2-core, discord-bot, frontend images and push to
git.vpn.cusano.net registry; SSH deploy pulls pre-built images (no
build on VM)
- Ansible: first-time setup only — git clone, env files from vault,
Caddyfile, docker login + compose pull + up; no rsync or on-VM builds
- docker-compose: add image: ${REGISTRY}/name:latest alongside build:
so local dev and CI registry both work
- gitignore: add Terraform state, lock, tfvars, ansible secrets
This commit is contained in:
+3
-2
@@ -17,17 +17,17 @@ services:
|
||||
- mosquitto_data:/mosquitto/data
|
||||
|
||||
c2-core:
|
||||
image: ${REGISTRY}/c2-core:${TAG:-latest}
|
||||
build: ./drb-c2-core
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8888:8000"
|
||||
env_file: ./drb-c2-core/.env
|
||||
volumes:
|
||||
- ./drb-c2-core/gcp-key.json:/app/gcp-key.json:ro
|
||||
depends_on:
|
||||
- mosquitto
|
||||
|
||||
discord-bot:
|
||||
image: ${REGISTRY}/discord-bot:${TAG:-latest}
|
||||
build: ./drb-server-discord-bot
|
||||
restart: unless-stopped
|
||||
env_file: ./drb-server-discord-bot/.env
|
||||
@@ -35,6 +35,7 @@ services:
|
||||
- c2-core
|
||||
|
||||
frontend:
|
||||
image: ${REGISTRY}/frontend:${TAG:-latest}
|
||||
build: ./drb-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user