-
Notifications
You must be signed in to change notification settings - Fork 56
/
docker-compose.yml
55 lines (53 loc) · 1.46 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
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:4.4.4"
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: "xbrowsersync/api:1.1.13"
restart: "unless-stopped"
volumes:
- "./settings.json:/usr/src/api/config/settings.json"
- "./healthcheck.js:/usr/src/api/healthcheck.js"
reverse-proxy:
command: "caddy reverse-proxy --from $API_HOSTNAME --to api:8080"
container_name: "xbs-reverse-proxy"
depends_on:
- "api"
image: "caddy:2.3.0-alpine"
ports:
- "443:443"
- "80:80"
restart: "unless-stopped"
volumes:
- "xbs-caddy-config:/config"
- "xbs-caddy-data:/data"
volumes:
xbs-caddy-config:
xbs-caddy-data:
xbs-db-backups:
xbs-db-data: