5152330c7c
Cosmetic-only rename, no functional/data-layer change: service names
(php-dynamic-qrcode -> qrforge-app, php-dynamic-qrcode-db -> qrforge-db),
the network (php-dynamic-qrcode-network -> qrforge-network), and the two
named volumes (php_dynamic_qrcode_db_data -> qrforge_db_data,
php_dynamic_qrcode_saved_qrcode_data -> qrforge_qrcode_storage), plus
matching references in nginx.conf's fastcgi_pass and .env.example's
DATABASE_HOST default. Database name itself ('qrcode') intentionally
left unchanged per user request.
Volume rename requires an explicit data migration on already-deployed
hosts (a bare name change would otherwise attach a fresh empty volume) -
handled separately as part of this same deploy, not by this commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fo3DiRRpmz2DXjD7Uzhc8u
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
services:
|
|
nginx:
|
|
image: "nginx:1.27-alpine"
|
|
restart: "unless-stopped"
|
|
ports:
|
|
- "80:80"
|
|
# Only open 443 once SSL certificates are mounted (e.g. via a certbot volume,
|
|
# or a separate reverse proxy like Caddy/Traefik in front). See the infra phase of the plan.
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- qrforge-app
|
|
networks:
|
|
- qrforge-network
|
|
|
|
qrforge-app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.fpm
|
|
restart: "unless-stopped"
|
|
environment:
|
|
TYPE: "docker"
|
|
QRCODE_GENERATOR: "${QRCODE_GENERATOR:-internal-chillerlan.qrcode}"
|
|
BASE_URL: "${BASE_URL:?set BASE_URL in .env, e.g. https://qr.ensembia.com}"
|
|
DATABASE_HOST: "qrforge-db"
|
|
DATABASE_PORT: "3306"
|
|
DATABASE_NAME: "${DATABASE_NAME:-qrcode}"
|
|
DATABASE_USER: "${DATABASE_USER:-qrcode}"
|
|
DATABASE_PASSWORD: "${DATABASE_PASSWORD:?set DATABASE_PASSWORD in .env}"
|
|
DATABASE_PREFIX: "${DATABASE_PREFIX:-}"
|
|
DATABASE_CHARSET: "${DATABASE_CHARSET:-utf8}"
|
|
depends_on:
|
|
qrforge-db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- qrforge_qrcode_storage:/var/www/qrcode-storage
|
|
networks:
|
|
- qrforge-network
|
|
|
|
qrforge-db:
|
|
image: "mysql:8.0"
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- qrforge_db_data:/var/lib/mysql
|
|
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:?set MYSQL_ROOT_PASSWORD in .env}"
|
|
MYSQL_DATABASE: "${DATABASE_NAME:-qrcode}"
|
|
MYSQL_USER: "${DATABASE_USER:-qrcode}"
|
|
MYSQL_PASSWORD: "${DATABASE_PASSWORD:?set DATABASE_PASSWORD in .env}"
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
networks:
|
|
- qrforge-network
|
|
|
|
volumes:
|
|
qrforge_db_data:
|
|
qrforge_qrcode_storage:
|
|
|
|
networks:
|
|
qrforge-network:
|
|
driver: bridge
|