forked from HabitRPG/habitica
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
46 lines (46 loc) · 1.17 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
version: "3"
services:
server:
build:
context: .
dockerfile: ./Dockerfile
target: server
depends_on:
- mongo
environment:
- NODE_DB_URI=mongodb://mongo/habitica # this only needs to be adapted if using a separate database
- BASE_URL=http://127.0.0.1:8080 # change this to the URL under which your instance will be reachable
- INVITE_ONLY=false # change to `true` after registration of initial users, to restrict further registrations
networks:
- habitica
ports:
- "3000:3000"
client:
build:
context: .
dockerfile: ./Dockerfile
target: client
depends_on:
- server
networks:
- habitica
ports:
- "8080:80"
mongo:
image: docker.io/mongo:5.0
restart: unless-stopped
command: ["--replSet", "rs", "--bind_ip_all", "--port", "27017"]
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate() }" | mongosh --port 27017 --quiet
interval: 10s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
networks:
- habitica
ports:
- "27017:27017"
networks:
habitica:
driver: bridge