Skip to content

Commit a86f474

Browse files
committed
fix: solve smtp issue and dead jobs
1. Healthcheck do Sidekiq (serviço sidekiq, antes do depends_on) 2. SMTP vars nos dois serviços (api e sidekiq)
1 parent d0e4d29 commit a86f474

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

docker/docker-compose.production.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ services:
139139
# Meilisearch (self-hosted — same Docker network)
140140
MEILISEARCH_URL: 'http://meilisearch:7700'
141141
MEILI_MASTER_KEY: '${MEILI_MASTER_KEY}'
142+
# SMTP (email delivery)
143+
SMTP_USERNAME: '${SMTP_USERNAME}'
144+
SMTP_PASSWORD: '${SMTP_PASSWORD}'
145+
SMTP_ADDRESS: '${SMTP_ADDRESS:-smtp.gmail.com}'
146+
SMTP_PORT: '${SMTP_PORT:-587}'
147+
SMTP_DOMAIN: '${SMTP_DOMAIN:-gmail.com}'
142148

143149
healthcheck:
144150
test:
@@ -185,12 +191,18 @@ services:
185191
# Meilisearch (self-hosted — same Docker network)
186192
MEILISEARCH_URL: 'http://meilisearch:7700'
187193
MEILI_MASTER_KEY: '${MEILI_MASTER_KEY}'
194+
# SMTP (email delivery)
195+
SMTP_USERNAME: '${SMTP_USERNAME}'
196+
SMTP_PASSWORD: '${SMTP_PASSWORD}'
197+
SMTP_ADDRESS: '${SMTP_ADDRESS:-smtp.gmail.com}'
198+
SMTP_PORT: '${SMTP_PORT:-587}'
199+
SMTP_DOMAIN: '${SMTP_DOMAIN:-gmail.com}'
188200
healthcheck:
189-
test: ["CMD-SHELL", "pgrep -f 'sidekiq' > /dev/null || exit 1"]
201+
test: ["CMD-SHELL", "ps aux | grep '[s]idekiq' || exit 1"]
190202
interval: 30s
191-
timeout: 5s
203+
timeout: 10s
192204
retries: 3
193-
start_period: 30s
205+
start_period: 60s
194206
depends_on:
195207
postgres:
196208
condition: service_healthy

0 commit comments

Comments
 (0)