File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11services :
2+ postgres :
3+ image : postgres:17-alpine
4+ restart : unless-stopped
5+ networks :
6+ - coolify
7+ volumes :
8+ - postgres-data:/var/lib/postgresql/data
9+ environment :
10+ POSTGRES_DB : ' ${POSTGRES_DB:-prostaff_production}'
11+ POSTGRES_USER : ' ${POSTGRES_USER:-prostaff}'
12+ POSTGRES_PASSWORD : ' ${POSTGRES_PASSWORD}'
13+ healthcheck :
14+ test : ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-prostaff} -d ${POSTGRES_DB:-prostaff_production}"]
15+ interval : 10s
16+ timeout : 5s
17+ retries : 5
18+ start_period : 20s
19+ labels :
20+ - coolify.managed=true
21+ - coolify.applicationId=1
22+ - coolify.type=application
23+
224 redis :
325 image : redis:7.2-alpine
426 restart : unless-stopped
@@ -120,6 +142,8 @@ services:
120142 start_period : 60s
121143
122144 depends_on :
145+ postgres :
146+ condition : service_healthy
123147 redis :
124148 condition : service_healthy
125149
@@ -147,6 +171,8 @@ services:
147171 MEILISEARCH_URL : ' http://meilisearch:7700'
148172 MEILI_MASTER_KEY : ' ${MEILI_MASTER_KEY}'
149173 depends_on :
174+ postgres :
175+ condition : service_healthy
150176 redis :
151177 condition : service_healthy
152178 api :
@@ -243,6 +269,8 @@ services:
243269 start_period : 10s
244270
245271volumes :
272+ postgres-data :
273+ driver : local
246274 redis-data :
247275 driver : local
248276 meilisearch-data :
Original file line number Diff line number Diff line change @@ -3,22 +3,20 @@ services:
33 # Para produção/homologação use Supabase (DATABASE_URL no .env)
44 # Este container é opcional - apenas para desenvolvimento offline ou testes
55 postgres :
6- image : postgres:15 -alpine
6+ image : postgres:17 -alpine
77 environment :
8- POSTGRES_DB : ${POSTGRES_DB:-prostaff_api_development }
9- POSTGRES_USER : ${POSTGRES_USER:-postgres }
8+ POSTGRES_DB : ${POSTGRES_DB:-prostaff_production }
9+ POSTGRES_USER : ${POSTGRES_USER:-prostaff }
1010 POSTGRES_PASSWORD : ${POSTGRES_PASSWORD:-password}
1111 volumes :
1212 - postgres_data:/var/lib/postgresql/data
1313 ports :
1414 - " ${POSTGRES_PORT:-5432}:5432"
1515 healthcheck :
16- test : ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres }"]
16+ test : ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-prostaff} -d ${POSTGRES_DB:-prostaff_production }"]
1717 interval : 10s
1818 timeout : 5s
1919 retries : 5
20- profiles :
21- - local-db # Use 'docker-compose --profile local-db up' para iniciar
2220
2321 # Redis for Sidekiq, Rails Cache and Rate Limiting
2422 redis :
You can’t perform that action at this time.
0 commit comments