Compare commits
1 Commits
7902b35393
...
fix/dokplo
| Author | SHA1 | Date | |
|---|---|---|---|
| 63e4c96e3e |
@@ -4,6 +4,8 @@
|
||||
# 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:
|
||||
@@ -13,6 +15,8 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
command: ["php", "artisan", "migrate", "--force", "--no-interaction"]
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
web:
|
||||
image: ${APP_IMAGE}:${IMAGE_TAG}
|
||||
@@ -31,6 +35,8 @@ services:
|
||||
timeout: 5s
|
||||
start_period: 40s
|
||||
retries: 3
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
queue:
|
||||
image: ${APP_IMAGE}:${IMAGE_TAG}
|
||||
@@ -44,6 +50,8 @@ services:
|
||||
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}
|
||||
@@ -57,3 +65,9 @@ services:
|
||||
command: ["php", "artisan", "schedule:work"]
|
||||
stop_grace_period: 30s
|
||||
stop_signal: SIGTERM
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
@@ -50,6 +50,8 @@ IMAGE_TAG=staging # or production
|
||||
|
||||
Point Dokploy domain(s) at service **`web`**, port **`8000`**. Do not publish PostgreSQL or host ports for app processes.
|
||||
|
||||
Compose services must join the external Docker network `dokploy-network` (declared in `docker-compose.deploy.yml`) so they can resolve the Dokploy-managed Postgres internal host (e.g. `amare-stg-pez43e`). Set `DB_HOST` to that **Internal Host** from the Dokploy database UI — not a public hostname.
|
||||
|
||||
Source can be GitHub (so Dokploy clones the compose file) or Raw paste of `docker-compose.deploy.yml`. Prefer GitHub + fixed compose path so updates stay in sync with `main`.
|
||||
|
||||
## Required Laravel env (Dokploy only)
|
||||
@@ -68,7 +70,7 @@ APP_FALLBACK_LOCALE=pt_BR
|
||||
APP_TIMEZONE=America/Fortaleza
|
||||
|
||||
DB_CONNECTION=pgsql
|
||||
DB_HOST=<dokploy-postgres-host>
|
||||
DB_HOST=<dokploy-postgres-internal-host> # Internal Host from Dokploy UI (requires dokploy-network)
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=amare_staging
|
||||
DB_USERNAME=...
|
||||
|
||||
Reference in New Issue
Block a user