-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (61 loc) · 1.61 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
services:
app:
build: .
restart: unless-stopped
deploy:
replicas: 1
update_config:
order: start-first
failure_action: rollback
environment:
- PORT=3000
- MONGO_URL=${MONGO_URL}
- TTL=${TTL}
- SESSION_RECOVERY_PERIOD=${SESSION_RECOVERY_PERIOD}
- LEADERBOARD_MAX=${LEADERBOARD_MAX}
- BUFFER_DISTANCE=${BUFFER_DISTANCE}
- METRICS=${METRICS}
- METRICS_SALT=${METRICS_SALT}
depends_on:
mongodb:
condition: service_healthy
https-portal:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
mongodb:
image: mongo:latest
command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
restart: unless-stopped
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongodb:27017'}]}) }" | mongosh --quiet
interval: 10s
timeout: 20s
start_period: 30s
retries: 5
volumes:
- mongodb_data:/data/db
- mongodb_config:/data/configdb
https-portal:
image: steveltn/https-portal:1
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
DOMAINS: 'geochat.live -> http://app:3000, www.geochat.live => https://geochat.live'
STAGE: 'production'
WEBSOCKET: 'true'
volumes:
- https-portal-data:/var/lib/https-portal
volumes:
mongodb_data:
mongodb_config:
https-portal-data:
networks:
default:
name: geochat-network