-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
146 lines (138 loc) · 3.5 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.8"
services:
frontend:
container_name: frontend_app
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- './frontend:/fastapi_app/frontend'
- '/fastapi_app/frontend/node_modules'
ports:
- "${FRONT_APP_PORT}:${FRONT_APP_PORT}"
# depends_on:
# backend:
# condition: service_healthy
backend:
container_name: fastapi_app
restart: unless-stopped
build:
context: .
dockerfile: ./backend/Dockerfile
env_file:
- .env
command: [ "sh", "/fastapi_app/backend/docker/app.sh" ]
ports:
- "${BACK_APP_PORT}:${BACK_APP_PORT}"
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:${BACK_APP_PORT}/health" ]
# interval: 3s
# timeout: 10s
# retries: 5
# depends_on:
# - db
db:
container_name: db_app
image: postgres:15
env_file:
- .env
environment:
PG_DATA: "/var/lib/postgresql/data/pgdata"
ports:
- "${DB_PORT}:${DB_PORT}"
command: [ "-p", "${DB_PORT}" ]
volumes:
- db-data:/var/lib/postgresql/data
restart: unless-stopped
#
# healthcheck:
# test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
# interval: 5s
# timeout: 10s
# retries: 5
# broker:
# container_name: rabbitmq_app
# build:
# context: ./backend/docker
# dockerfile: rabbitmq.Dockerfile
# hostname: "${BROKER_HOSTNAME}"
# env_file:
# - .env
# expose:
# - "${BROKER_PORT}"
# ports:
# - "${BROKER_HOST_PORT}:${BROKER_HOST_PORT}"
# restart: on-failure
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:${BROKER_HOST_PORT}"]
# interval: 5s
# timeout: 10s
# retries: 5
# depends_on:
# backend:
# condition: service_healthy
# region Redis
# broker:
# image: redis:7
# env_file:
# - .env
# container_name: redis_app
# hostname: redis
# command: "redis-server --save 20 1 --loglevel warning"
# expose:
# - "${BROKER_PORT}"
# ports:
# - "${BROKER_HOST_PORT}:${BROKER_HOST_PORT}"
# restart: on-failure
# healthcheck:
# test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
# interval: 5s
# timeout: 10s
# retries: 5
# depends_on:
# backend:
# condition: service_healthy
# endregion
# celery:
# container_name: celery_app
# build:
# context: ./
# dockerfile: backend/Dockerfile
# env_file:
# - .env
# command: [ "/fastapi_app/backend/docker/celery.sh", "celery" ]
# depends_on:
# broker:
# condition: service_healthy
# backend:
# condition: service_healthy
# flower:
# container_name: flower_app
# build:
# context: ./
# dockerfile: backend/Dockerfile
# env_file:
# - .env
# command: [ "/fastapi_app/backend/docker/celery.sh", "flower" ]
# ports:
# - "${FLOWER_HOST_PORT}:${CELERY_PORT}"
# depends_on:
# broker:
# condition: service_healthy
# celery:
# condition: service_started
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
env_file:
- .env
environment:
PGADMIN_DEFAULT_EMAIL: "${PG_ADMIN_EMAIL}"
PGADMIN_DEFAULT_PASSWORD: "${PG_ADMIN_PASS}"
ports:
- "${PGADMIN_HOST_PORT}:${PGADMIN_PORT}"
# depends_on:
# backend:
# condition: service_healthy
volumes:
db-data: