build(docker): warm prod cache at build time and add prod compose file
- Run cache:warmup in the build stage so containers start with a pre-built Symfony kernel and DI container - Scope the cache volume to var/cache/prod/pools where Symfony writes pool data, preserving the warmed kernel across container restarts - Add docker-compose.prod.yml for deploying the registry image without the dev override being picked up automatically - Expand .dockerignore to exclude vendor/, tests/, docs, compose files, and env files from the build context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
graph:
|
||||
image: git.arthurerlich.de/haylan/git-contribution-graph:latest
|
||||
container_name: git-contribution-graph
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
APP_ENV: prod
|
||||
APP_DEBUG: "0"
|
||||
APP_SECRET: "${APP_SECRET}"
|
||||
ALLOWED_HOSTS: "${ALLOWED_HOSTS:-}"
|
||||
GITHUB_USER: "${GITHUB_USER:-}"
|
||||
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
|
||||
GITLAB_USER: "${GITLAB_USER:-}"
|
||||
GITLAB_TOKEN: "${GITLAB_TOKEN:-}"
|
||||
GITLAB_URL: "${GITLAB_URL:-}"
|
||||
GITEA_USER: "${GITEA_USER:-}"
|
||||
GITEA_TOKEN: "${GITEA_TOKEN:-}"
|
||||
GITEA_URL: "${GITEA_URL:-}"
|
||||
volumes:
|
||||
- cache:/app/var/cache/prod/pools
|
||||
- logs:/app/var/log
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
cache:
|
||||
logs:
|
||||
Reference in New Issue
Block a user