-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
133 lines (120 loc) · 2.43 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
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
version: '3'
services:
frontend:
image: node:20-alpine
command: sh -c "yarn install && yarn run dev --port=3000 --host"
user: 1000:1000
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
networks:
messenger:
ipv4_address: 10.5.1.3
env_file:
- .frontend.env
ports:
- 80:3000
working_dir: /frontend
volumes:
- ./web_frontend:/frontend
api:
image: msg_api_dev
command: conda run --no-capture-output -n cenv flask --app flaskr run --debug --host=10.5.1.10 --port=80
user: 1000:1000
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
networks:
messenger:
ipv4_address: 10.5.1.10
ports:
- 8090:80
env_file:
- .api.env
- .postgresql.env
depends_on:
- postgres
working_dir: /api
volumes:
- ./api:/api
api_uwsgi:
build:
context: api
target: prod
networks:
messenger:
ipv4_address: 10.5.1.11
ports:
- 443:443
- 47485:80
env_file:
- .api.env
- .postgresql.env
volumes:
- ./crt:/crt
frontend_prod:
build:
context: web_frontend
target: serve
args:
- apiURI=${PROD_API_URI}
- apiURL=${PROD_API_URL}
networks:
messenger:
ipv4_address: 10.5.1.12
ports:
- 3000:80
postgres:
image: postgres:16-alpine
restart: always
networks:
messenger:
ipv4_address: 10.5.1.100
environment:
PGDATA: /data/db
volumes:
- pgstorage:/data/db
- ./init-postgres.sh:/docker-entrypoint-initdb.d/init-db.sh
env_file:
- .postgresql.env
adminer:
image: adminer
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
networks:
messenger:
ipv4_address: 10.5.1.101
ports:
- 8081:8080
nginx:
build:
context: nginx
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
networks:
messenger:
ipv4_address: 10.5.1.80
ports:
- 8080:80
volumes:
pgstorage:
networks:
messenger:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16