forked from awinterstein/habitica
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (39 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
39 lines (39 loc) · 1.11 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
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"
mongo:
image: docker.io/mongo:latest
restart: unless-stopped
hostname: mongo
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
volumes:
- ./mongodb-data/db:/data/db:rw,Z
- ./mongodb-data/dbconf:/data/configdb:Z
networks:
habitica:
aliases:
- mongo
networks:
habitica:
driver: bridge