-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.42 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
version: "3.9"
services:
postgres:
image: postgres:14.5
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 5s
timeout: 5s
retries: 50
mongo:
image: mongo
ports:
- '27017:27017'
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongo12
- MONGO_INITDB_DATABASE=database
volumes:
- ./data/mongo:/data/db
backend:
restart: on-failure:5
build:
context: ../backend
command: bash -c "python manage.py makemigrations && python manage.py migrate && gunicorn backend.wsgi --bind 0.0.0.0:8000"
volumes:
- ./backend:/code
- ./backend/tmp/mysqld:/run/mysqld
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
depends_on:
postgres:
condition: service_healthy
mongo:
condition: service_started
frontend:
build:
context: ../frontend
stdin_open: true
tty: true
depends_on:
- backend
nginx:
build:
context: ./nginx
ports:
- 8090:8091
depends_on:
- backend
- frontend