42 lines
967 B
YAML
42 lines
967 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
target: app
|
|
environment:
|
|
APP_ENV: prod
|
|
APP_DEBUG: "0"
|
|
APP_SECRET: ${APP_SECRET:-change-me}
|
|
DATABASE_URL: sqlite:////app/var/data/app.db
|
|
APP_CACHE_DIR: /app/var/bootstrap-cache
|
|
volumes:
|
|
- app-data:/app/var/data
|
|
- app-cache:/app/var/bootstrap-cache
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "php -r 'exit(@fsockopen(\"127.0.0.1\", 9000) ? 0 : 1);'"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
target: web
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${HTTP_PORT:-8080}:80"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1/ || exit 1"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
app-data:
|
|
app-cache:
|