-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
50 lines (49 loc) · 1.06 KB
/
docker-compose.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
services:
postgres:
image: postgres:15.1
restart: always
user: postgres
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
- ./postgres/:/docker-entrypoint-initdb.d/
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: [ "CMD-SHELL", "redis-cli", "ping" ]
interval: 5s
timeout: 1s
retries: 3
backend:
build:
context: backend
ports:
- "8085:8080"
depends_on:
- postgres
- redis
environment:
- DB_HOST=${DB_HOST}
- DB_USER=${DB_USER}
- DB_NAME=${DB_NAME}
- DB_PASSWORD=${DB_PASSWORD}
- HTTP_PORT=${HTTP_PORT}
- REDIS_URL=${REDIS_URL}
volumes:
db-data:
redis-data: