Files
lisilou-portfolio/docker-compose.yml
T
jhodgkin 016256cd2f
Deploy to Dev / Deploy & Smoke Test (push) Successful in 20s
Deploy to Prod / Deploy & Smoke Test (prod) (push) Failing after 30s
Add registry-based prod promotion, separate from auto dev deploy
Dev keeps auto-deploying on every push to main, same as before, but now
also publishes each build to git.jerodrigged.com's container registry
tagged by short commit SHA (best-effort - never blocks the dev deploy
if REGISTRY_TOKEN isn't set yet).

Prod deploys only on an intentional `git push origin main:prod`, and
only ever pulls a pre-built SHA-tagged image - it never rebuilds from
source. This guarantees prod runs the exact artifact dev already
validated, and makes promoting an untested commit fail loudly (pull of
a nonexistent tag) instead of silently rebuilding something new.

Needs new secrets before the prod path works: PROD_SSH_KEY, PROD_HOST,
PROD_USER, REGISTRY_USER, REGISTRY_TOKEN. PROD_SSH_KEY/PROD_HOST/
REGISTRY_USER are already set; PROD_USER and REGISTRY_TOKEN still need
Jerod's input.
2026-07-20 04:47:49 +00:00

54 lines
1.3 KiB
YAML

version: '3.8'
services:
portfolio:
build:
context: .
dockerfile: Dockerfile
image: lisilou-portfolio-web:local
container_name: lisilou-portfolio
restart: unless-stopped
ports:
- "8080:80"
volumes:
# Mount config for easy updates without rebuilding
- ./config:/usr/share/nginx/html/config:ro
# Mount images for easy updates
- ./public/images:/usr/share/nginx/html/images:ro
environment:
- TZ=America/Denver
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- web
api:
build:
context: ./api
dockerfile: Dockerfile
image: lisilou-portfolio-api:local
container_name: lisilou-api
restart: unless-stopped
env_file:
- ./api/.env
volumes:
- ./api/data:/app/data
- ./api/signed-contracts:/app/signed-contracts
- ./api/contracts:/app/contracts:ro
networks:
- web
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
networks:
web:
external: true