-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
166 lines (148 loc) · 3.96 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
version: '3.7'
services:
#this nginx is only for testing reverse proxy from web to other service
# nginx:
# image: nginx:1.19.6-alpine
# volumes:
# - ./web/config/default.conf.template:/etc/nginx/templates/default.conf.template
# - ./web/config/nginx.conf:/etc/nginx/nginx.conf
# ports:
# - "6969:80"
# environment:
# GOSTY_APISERVER_SERVICE_HOST: apiserver
# GOSTY_APISERVER_SERVICE_PORT: 8000
#
# GOSTY_FILESERVER_SERVICE_HOST: fileserver
# GOSTY_FILESERVER_SERVICE_PORT: 8001
web:
image: localhost:5000/gosty-web-dev
restart: always
volumes:
- ./web/config/default.conf.template:/etc/nginx/templates/default.conf.template
- ./web/config/nginx.conf:/etc/nginx/nginx.conf
ports:
- "8082:80"
environment:
GOSTY_APISERVER_SERVICE_HOST: apiserver
GOSTY_APISERVER_SERVICE_PORT: 8000
GOSTY_FILESERVER_SERVICE_HOST: fileserver
GOSTY_FILESERVER_SERVICE_PORT: 8001
apiserver:
image: localhost:5000/gosty-apiserver
restart: always
depends_on:
- mongo
- rabbitmq
- fileserver
ports:
- "8000:8000"
- "8086:8086"
expose:
- "8000"
- "8086"
environment:
PORT: 8000
MONGODB_SERVICE_HOST: mongo
MONGODB_SERVICE_PORT: 27017
MONGODB_USERNAME: username
MONGODB_PASSWORD: password
MONGODB_DATABASE: gosty
MONGODB_TIMEOUT: 2
RABBIT_RABBITMQ_SERVICE_HOST: rabbitmq
RABBIT_RABBITMQ_SERVICE_PORT: 5672
RABBITMQ_USERNAME: username
RABBITMQ_PASSWORD: password
GOSTY_FILESERVER_SERVICE_HOST: fileserver
GOSTY_FILESERVER_SERVICE_PORT: 8001
FILE_MIN_SIZE_MB: 5
volumes:
- ./config.env:/app/config.env
worker:
image: localhost:5000/gosty-worker
restart: always
depends_on:
- mongo
- rabbitmq
- fileserver
expose:
- "8088"
environment:
RABBIT_RABBITMQ_SERVICE_HOST: rabbitmq
RABBIT_RABBITMQ_SERVICE_PORT: 5672
RABBITMQ_USERNAME: username
RABBITMQ_PASSWORD: password
GOSTY_FILESERVER_SERVICE_HOST: fileserver
GOSTY_FILESERVER_SERVICE_PORT: 8001
POD_IP: worker
volumes:
- ./config.env:/app/config.env
fileserver:
image: localhost:5000/gosty-fileserver
restart: always
volumes:
- ./storage:/app/storage/
- ./config.env:/app/config.env
ports:
- "8001:8001"
expose:
- 8001
environment:
PORT: "8001"
PEER_HOST: "0.0.0.0:8002"
mongo:
container_name: mongo
image: mongo:4.4.4-bionic
restart: always
environment:
MONGO_INITDB_DATABASE: gosty
MONGO_INITDB_ROOT_USERNAME: username
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "27017:27017"
expose:
- 27017
volumes:
- mongo-volume:/data/db
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8.12-management-alpine
volumes:
- rabbitmq-volume-etc:/etc/rabbitmq/
- rabbitmq-volume-data:/var/lib/rabbitmq/
- rabbitmq-volume-logs:/var/log/rabbitmq/
environment:
RABBITMQ_DEFAULT_USER: username
RABBITMQ_DEFAULT_PASS: password
ports:
- "5672:5672"
- "15672:15672"
# fileserver-0:
# image: luqmansen/gosty-fileserver
# container_name: fileserver-0
# hostname: fileserver-0
# restart: always
# volumes:
# - ./storage0:/app/storage/
# - ./config.env:/app/config.env
# expose:
# - 8001
# - 22
# environment:
# PORT: "8001"
# FILESERVER_PEER_HOST: "fileserver-1,fileserver-2"
# This container doesn't related to application,
# but very handy on development
registry:
container_name: gosty-registry
restart: unless-stopped
image: registry:2.7.1
ports:
- 5000:5000
volumes:
- gosty-registry:/var/lib/registry:rw
volumes:
rabbitmq-volume-etc:
rabbitmq-volume-data:
rabbitmq-volume-logs:
mongo-volume:
gosty-registry: