-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 2.06 KB
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
services:
traefik:
image: traefik:v3.5
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
steedos:
image: steedos/steedos-enterprise:3.0.0-beta.126
deploy:
replicas: 2
# ports:
# - "5100:80"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:5100/"]
interval: 30s
timeout: 5s
retries: 3
labels:
- traefik.enable=true
- traefik.http.routers.steedos.rule=PathPrefix(`/`)
- traefik.http.routers.steedos.entrypoints=web
- traefik.http.services.steedos.loadbalancer.server.port=80
# Sticky session to keep socket.io stable
- traefik.http.services.steedos.loadbalancer.sticky.cookie=true
- traefik.http.services.steedos.loadbalancer.sticky.cookie.name=steedos_session
volumes:
- './steedos-storage:/steedos-storage'
- './.steedos:/app/.steedos'
environment:
- STEEDOS_LICENSE=
- ROOT_URL=http://127.0.0.1
- MONGO_URL=mongodb://mongodb:27017/steedos
redis:
image: redis:6.2.10
command: "redis-server --save \"\" --appendonly no --loglevel warning"
ports:
- "6379:6379"
mongodb:
image: mongo:7.0
ports:
- 27017:27017
command: >
bash -c "
mongod --replSet steedos --bind_ip_all --quiet --logpath /var/log/mongodb/mongodb.log --logappend &
echo '=> Waiting for MongoDB to start ...';
until mongosh --eval 'db.runCommand(\"ping\").ok' --quiet | grep 1; do
sleep 2;
done;
echo '=> Initiating replica set ...';
mongosh --eval 'rs.initiate({_id: \"steedos\", members: [{_id: 0, host: \"localhost:27017\"}]})';
wait
"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh --quiet | grep 1
interval: 10s
timeout: 10s
retries: 5
volumes:
- 'steedos-mongodb:/data/db'
volumes:
steedos-mongodb:
driver: local