Files
amare/docker-compose.deploy.yml
manoel freitas 716196dbe0 fix: owner path manoel-freitas/amare no registry Gitea
Conta renomeada admin→manoel-freitas; paths de imagem e docs
alinham com repo real no git.hellomanoel.com.
2026-08-12 14:21:24 -03:00

80 lines
2.4 KiB
YAML

# Shared Compose for Dokploy staging and production.
# Both stacks use the same file with different env:
# APP_IMAGE=git.hellomanoel.com/manoel-freitas/amare
# IMAGE_TAG=staging|production|<git-sha>
# PostgreSQL is a separate Dokploy database service (not defined here).
# Traefik/Dokploy domains should target service `web` port 8000.
# App services join dokploy-network so they can resolve Dokploy-managed
# Postgres internal hosts (e.g. amare-stg-pez43e).
services:
migrate:
image: ${APP_IMAGE}:${IMAGE_TAG}
pull_policy: always
restart: "no"
env_file:
- .env
# Exec-array form on a single line, deliberately. A folded block scalar
# (`command: >`) keeps the newline before any line indented deeper than the
# first, so `sh -c` receives a multi-line string and dies with
# `sh: 2: Syntax error: "&&" unexpected` before running anything. That broke
# every staging deploy from 58f24a6 onward, and had already broken them once
# before 5949fad. Keep this on one line; do not reformat it for width.
command: ["sh", "-c", "php artisan migrate --force --no-interaction && php artisan db:seed --class=ContentSeeder --force --no-interaction && php artisan media:generate-variants"]
networks:
- dokploy-network
web:
image: ${APP_IMAGE}:${IMAGE_TAG}
pull_policy: always
restart: unless-stopped
env_file:
- .env
depends_on:
migrate:
condition: service_completed_successfully
expose:
- "8000"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/up"]
interval: 30s
timeout: 5s
start_period: 40s
retries: 3
networks:
- dokploy-network
queue:
image: ${APP_IMAGE}:${IMAGE_TAG}
pull_policy: always
restart: unless-stopped
env_file:
- .env
depends_on:
migrate:
condition: service_completed_successfully
command: ["php", "artisan", "queue:work", "--sleep=2", "--tries=3", "--max-time=3600"]
stop_grace_period: 60s
stop_signal: SIGTERM
networks:
- dokploy-network
scheduler:
image: ${APP_IMAGE}:${IMAGE_TAG}
pull_policy: always
restart: unless-stopped
env_file:
- .env
depends_on:
migrate:
condition: service_completed_successfully
command: ["php", "artisan", "schedule:work"]
stop_grace_period: 30s
stop_signal: SIGTERM
networks:
- dokploy-network
networks:
dokploy-network:
external: true