-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 773 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (34 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
services:
db:
env_file:
- .env
image: postgres
restart: always
ports:
- ${POSTGRES_PORT}:5432
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 3s
retries: 5
backend:
env_file:
- .env
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=${POSTGRES_PORT}
- APP_ENV=${APP_ENV}
build:
context: .
dockerfile: Dockerfile
ports:
- ${APP_PORT}:${APP_PORT}
depends_on:
db:
condition: service_healthy