-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (64 loc) · 1.45 KB
/
docker-compose.yml
File metadata and controls
72 lines (64 loc) · 1.45 KB
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
services:
geo_database:
image: postgis/postgis
container_name: geo_database
hostname: geo_database
restart: always
env_file:
- .env
ports:
- "6587:${POSTGRES_PORT}"
volumes:
- postgres_geo_datastorage:/var/lib/postgresql/data
networks:
- main_network
backend_geo:
build:
dockerfile: Dockerfile
context: ./django_drf_backend
container_name: backend_geo
hostname: backend_geo
restart: always
env_file:
- .env
volumes:
- ./django_drf_backend:/app
ports:
- "8000:8000"
command: |
sh -c "
python manage.py migrate &&
gunicorn --bind 0.0.0.0:8000 --reload core.wsgi:application
"
networks:
- main_network
react_frontend:
hostname: react_frontend
container_name: react_frontend
build:
context: ./react_frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./react_frontend:/app
- /app/node_modules # Зверни увагу: node_modules, а не node-modules
command: npm run dev -- --host 0.0.0.0
networks:
- main_network
nginx_geo:
image: nginx:alpine
container_name: nginx_geo
restart: always
ports:
- "80:80"
networks:
- main_network
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
main_network:
driver: bridge
volumes:
postgres_geo_datastorage:
external: false