-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (52 loc) · 1.14 KB
/
docker-compose.yml
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
51
52
version: "3.8"
services:
redis:
image: redis:7.4.1-alpine
restart: always
ports:
- '6379:6379'
command: redis-server
healthcheck:
test: redis-cli ping
interval: 3s
timeout: 5s
retries: 5
# redisinsight:
# image: 'redislabs/redisinsight:latest'
# ports:
# - '5540:5540'
postgres:
env_file:
- ".env"
image: postgres:alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- "./data/postgres:/var/lib/postgresql/data"
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready","-U","${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
backend:
image: ghcr.io/persianccbook/backend:latest
env_file:
- ".env"
volumes:
- "/srv/http/static:/app/static"
- "/srv/http/media:/app/media"
depends_on:
postgres:
condition: service_healthy
ports:
- "8000:8000"
frontend:
image: ghcr.io/persianccbook/frontend:latest
ports:
- "3000:3000"
depends_on:
- backend