-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
97 lines (96 loc) · 2.12 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
version: "3.3"
services:
db:
image: postgres:10
env_file: env_prod
volumes:
- ./storage/pgdata:/var/lib/postgresql/data
networks:
main:
ipv4_address: 172.19.0.6
deploy:
placement:
constraints: [node.role == manager]
app:
build: ./monaba
hostname: monaba.in
image: docker.pkg.github.com/ahushh/monaba/app:latest
command: /opt/monaba/Monaba /var/settings.yml
env_file: env_prod
depends_on:
- db
links:
- db
volumes:
- ./storage/upload:/opt/monaba/upload
- ./storage/banners:/opt/monaba/static/banners
- ./settings.yml:/var/settings.yml
tmpfs:
- /opt/monaba/static/tmp:size=1G
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
update_config:
parallelism: 1
delay: 2s
networks:
main:
ipv4_address: 172.19.0.5
webserver:
build: ./webserver
image: docker.pkg.github.com/ahushh/monaba/webserver:latest
ports:
- "80:80"
links:
- app
volumes:
- ./storage/upload:/opt/monaba/upload
networks:
main:
ipv4_address: 172.19.0.4
deploy:
placement:
constraints: [node.role == manager]
search:
build: ./search
hostname: search.in
image: docker.pkg.github.com/ahushh/monaba/search:latest
links:
- app
depends_on:
- app
volumes:
- ./storage/searchdata:/var/lib/sphinxsearch/data
deploy:
placement:
constraints: [node.role == manager]
networks:
main:
ipv4_address: 172.19.0.3
aliases:
- search.in
torgate:
build: ./torgate
image: docker.pkg.github.com/ahushh/monaba/torgate:latest
env_file: env_prod
links:
- webserver
networks:
main:
ipv4_address: 172.19.0.2
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
update_config:
parallelism: 1
delay: 2s
monitor: 2s
networks:
main:
ipam:
config:
- subnet: 172.19.0.0/16