-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-full.yml
170 lines (157 loc) · 3.73 KB
/
docker-compose-full.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
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
167
168
169
170
version: "3.8"
networks:
sama_network:
driver: bridge
ipam:
driver: default
config:
- subnet: "172.25.0.0/16"
services:
nginx:
networks:
sama_network:
ipv4_address: 172.25.0.8
restart: always
build:
context: ./prefs/nginx
dockerfile: Dockerfile.nginx
ports:
- "9000:9000"
sama-client:
build:
context: ./prefs/client
dockerfile: Dockerfile.frontend
networks:
sama_network:
ipv4_address: 172.25.0.9
ports:
- "3000:3000"
volumes:
- ./prefs/client/.env.frontend:/app/.env
sama-server:
build:
context: .
dockerfile: Dockerfile.local
depends_on:
mongo:
condition: service_healthy
entrypoint: >
sh -c "npm run migrate-mongo-up && npm run start"
networks:
sama_network:
ipv4_address: 172.25.0.7
volumes:
- ./.env.docker:/app/.env
environment:
- MINIO_ENDPOINT=${MINIO_ENDPOINT:-172.25.0.2}
- MINIO_PORT=${MINIO_PORT:-9000}
sama-push-daemon:
build:
context: ./prefs/push
dockerfile: Dockerfile.push
networks:
sama_network:
ipv4_address: 172.25.0.10
volumes:
- ./prefs/push/.env.push:/app/.env
sama-push-dashboard:
build:
context: ./prefs/push-dashboard
dockerfile: Dockerfile.push-dashboard
networks:
sama_network:
ipv4_address: 172.25.0.11
ports:
- "3001:3000"
volumes:
- ./prefs/push-dashboard/.env.push-dashboard:/app/.env
sama-server-dashboard:
build:
context: ./prefs/server-dashboard
dockerfile: Dockerfile.server-dashboard
networks:
sama_network:
ipv4_address: 172.25.0.12
ports:
- "9002:9002"
volumes:
- ./prefs/server-dashboard/.env.server-dashboard:/app/.env
s3:
image: minio/minio
networks:
sama_network:
ipv4_address: 172.25.0.2
ports:
- "9011:9001"
- "9010:9000"
volumes:
- data:/data
env_file:
- ./.env.docker
command: server --address 0.0.0.0:9000 --console-address :9001 /data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 30s
timeout: 20s
retries: 3
s3-service:
image: minio/mc
networks:
sama_network:
ipv4_address: 172.25.0.3
depends_on:
s3:
condition: service_healthy
env_file:
- ./.env.docker
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set sama http://s3:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb sama/samabucket;
/usr/bin/mc policy set public sama/samabucket;
/usr/bin/mc admin user svcacct add --access-key $${MINIO_ACCESS_KEY} --secret-key $${MINIO_SECRET_KEY} sama $${MINIO_ROOT_USER}
"
mongo:
platform: linux/x86_64
image: mongo:4.4
networks:
sama_network:
ipv4_address: 172.25.0.4
container_name: server_mongo_database
restart: always
volumes:
- mongo:/data/db
environment:
- MONGO_INITDB_DATABASE=samadb
ports:
- "27017:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/samadb --quiet
interval: 30s
timeout: 20s
retries: 3
redis:
image: redis
networks:
sama_network:
ipv4_address: 172.25.0.5
container_name: server_redis_database
restart: always
ports:
- "6379:6379"
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
networks:
sama_network:
ipv4_address: 172.25.0.6
restart: always
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
volumes:
data:
mongo:
mongo-tests: