forked from Ropho/Pirater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
115 lines (102 loc) · 2.13 KB
/
docker-compose.yaml
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
version: '3'
services:
db:
image: mysql
restart: always
environment:
- TZ=Europe/Moscow
- MYSQL_ROOT_PASSWORD=2280
- MYSQL_DATABASE=piraterDB
command: mysqld --general-log=1 --general-log-file=/var/lib/mysql/general-log.log/log.log --default-time-zone=+3:00
networks:
internal:
ipv4_address: 10.5.0.3
ports:
- 3306:3306
volumes:
- db-data:/var/lib/mysql
- ./logs/mysql:/var/lib/mysql/general-log.log
web_server:
image: nginxapp
restart: always
ports:
- 80:80
depends_on:
- goapp-1
# network_mode: host
environment:
- TZ=Europe/Moscow
networks:
internal:
ipv4_address: 10.5.0.4
volumes:
- ./logs/server:/var/log/nginx
# - ./shared:/data
- go-data:/shared
cookie_db:
image: redis
restart: always
command: redis-server --save 20 1 --loglevel warning --requirepass 1337
environment:
- TZ=Europe/Sofia
- 6379:6379
networks:
internal:
ipv4_address: 10.5.0.5
volumes:
- cookie-data:/data
- ./logs/redis:/var/log
swagger-ui:
image: swaggerapi/swagger-ui
restart: always
volumes:
- ./docs:/usr/share/nginx/html/doc
environment:
API_URL: doc/swagger.yaml
networks:
internal:
ipv4_address: 10.5.0.6
goapp-1:
image: goapp
restart: always
depends_on:
- db
- cookie_db
environment:
- TZ=Europe/Moscow
user: root
command: ["-config", "config.yaml"]
volumes:
# - ./shared:/app/shared
- go-data:/app/shared
networks:
internal:
ipv4_address: 10.5.0.10
goapp-2:
image: goapp
restart: always
depends_on:
- db
- cookie_db
environment:
- TZ=Europe/Moscow
command: ["-config", "config-2.yaml"]
volumes:
- go-data:/app/shared
# - ./shared:/app/shared
networks:
internal:
ipv4_address: 10.5.0.11
volumes:
db-data:
driver: local
cookie-data:
driver: local
go-data:
driver: local
networks:
internal:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/24