-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
94 lines (87 loc) · 2.05 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
89
90
91
92
93
94
services:
account_api:
container_name: account_api
build:
context: ./backend
dockerfile: docker/account.Dockerfile
command: poetry run python account/main.py
# command: sleep infinity
volumes:
- ./backend/account/accounts/:/home/python_user/account/accounts/
- ./backend/account/django_core/:/home/python_user/account/django_core/
- ./backend/account/utils/:/home/python_user/account/utils/
- ./backend/account/rest_api/:/home/python_user/account/rest_api/
- ./backend/account/permissions/:/home/python_user/account/permissions/
ports:
- "8081:8081"
env_file:
- backend/account/.env
depends_on:
- postgres
links:
- postgres:pgsql-server
networks:
- backend
postgres:
container_name: postgres
image: postgres:latest
restart: always
env_file:
- ./.env
volumes:
- postgres_data:/var/lib/postgresql/data
- ./create-multiple-postgresql-databases.sh:/docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh
networks:
- backend
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: always
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5050:5050"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
networks:
- backend
redis:
image: redis:7.2.5-alpine3.20
container_name: redis
volumes:
- redis-data:/data
networks:
- backend
nginx:
build:
context: ./nginx
dockerfile: nginx.Dockerfile
container_name: nginx
ports:
- "3000:3000"
depends_on:
- account_api
networks:
- frontend
- backend
frontend:
build:
context: ./frontend
dockerfile: frontend.Dockerfile
container_name: frontend
ports:
- "80:80"
networks:
- frontend
volumes:
postgres_data:
pgadmin_data:
redis-data:
networks:
frontend:
driver: bridge
backend:
driver: bridge