forked from xbrowsersync/api-docker
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
40 lines (38 loc) · 1.08 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
version: "3.7"
services:
db:
container_name: "xbs-db"
environment:
- "MONGO_INITDB_DATABASE=$DB_NAME"
- "MONGO_INITDB_ROOT_PASSWORD=$DB_PASSWORD"
- "MONGO_INITDB_ROOT_USERNAME=$DB_USERNAME"
- "XBS_DB_NAME=$DB_NAME"
- "XBS_DB_PASSWORD=$DB_PASSWORD"
- "XBS_DB_USERNAME=$DB_USERNAME"
image: "mongo:latest"
restart: "unless-stopped"
volumes:
- "xbs-db-data:/data/db"
- "xbs-db-backups:/data/backups"
- "./mongoconfig.js:/docker-entrypoint-initdb.d/mongoconfig.js"
api:
container_name: "xbs-api"
depends_on:
- "db"
environment:
- "XBROWSERSYNC_DB_PWD=$DB_PASSWORD"
- "XBROWSERSYNC_DB_USER=$DB_USERNAME"
healthcheck:
test: [ "CMD", "node", "/usr/src/api/healthcheck.js" ]
interval: "1m"
timeout: "10s"
retries: "5"
start_period: "30s"
image: "steccas/xbs-api:latest"
restart: "unless-stopped"
volumes:
- "./settings.json:/usr/src/api/config/settings.json"
- "./healthcheck.js:/usr/src/api/healthcheck.js"
volumes:
xbs-db-backups:
xbs-db-data: