forked from arseny2606/PROD-yet-another-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (80 loc) · 1.85 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
services:
smm_ya_database:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: "smm_ya_database"
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "very_long_password"
container_name: SMM-ya-database
ports:
- "5433:5432"
volumes:
- database:/var/lib/postgresql/data
networks:
smm_ya:
ipv4_address: 172.31.0.4
smm_ya_frontend:
build:
dockerfile: Dockerfile
context: frontend
container_name: SMM-ya-frontend
ports:
- "4173:4173"
restart: always
environment:
- VITE_BACKEND_URL=/
networks:
smm_ya:
ipv4_address: 172.31.0.2
smm_ya_backend:
build:
dockerfile: Dockerfile
context: backend
container_name: SMM-ya-backend
depends_on:
- smm_ya_database
environment:
- POSTGRES_CONN=postgresql://root:very_long_password@smm_ya_database:5432/smm_ya_database
- JWT_SECRET_KEY=f3e19eccfafe1ada7e9ebafc939c0f11d78d623f24c63fb797b7fee84783795f
ports:
- "5437:5437"
restart: always
networks:
smm_ya:
ipv4_address: 172.31.0.3
smm_ya_nginx:
image: nginx:1.25
container_name: SMM-ya-nginx
ports:
- "80:80"
networks:
smm_ya:
ipv4_address: 172.31.0.5
volumes:
- ./nginx:/etc/nginx/conf.d
restart: always
smm_ya_worker:
build:
dockerfile: Dockerfile
context: worker
container_name: SMM-ya-worker
depends_on:
- smm_ya_database
- smm_ya_backend
environment:
- POSTGRES_CONN=postgresql://root:very_long_password@smm_ya_database:5432/smm_ya_database
restart: always
networks:
smm_ya:
ipv4_address: 172.31.0.6
volumes:
database:
nginx-conf.d:
networks:
smm_ya:
ipam:
driver: default
config:
- subnet: 172.31.0.0/24
gateway: 172.31.0.1