-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
88 lines (83 loc) · 1.63 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3.9"
networks:
nw-db:
driver: bridge
nw-nginx:
driver: bridge
services:
backend:
container_name: backend
build:
context: ./backend
dockerfile: ./Dockerfile
restart: always
volumes:
- type: bind
source: ./backend
target: /data
ports:
- "4000:4000"
networks:
nw-db: {}
nw-nginx: {}
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres
image: postgres:latest
volumes:
- type: bind
source: ./db
target: /var/lib/postgresql/data/pgdata
restart: always
networks:
nw-db:
aliases:
- postgres
env_file:
- .env
healthcheck:
test: pg_isready -d $POSTGRES_DB -h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER
interval: 10s
timeout: 30s
retries: 20
start_period: 10s
# pgadmin:
# container_name: pgadmin
# image: dpage/pgadmin4:latest
# restart: always
# ports:
# - "8000:80"
# env_file:
# - ./config/.pgadmin.env
# networks:
# nw-db: {}
# depends_on:
# postgres:
# condition: service_healthy
nginx:
container_name: nginx
build:
context: ./nginx
dockerfile: ./Dockerfile
restart: always
volumes:
- type: bind
source: ./backend/back/img
target: /img
networks:
nw-nginx:
aliases:
- nginx
ports:
- "8443:8443"
- "443:443"
- "80:80"
env_file:
- .env
depends_on:
backend:
condition: service_healthy