docker-compose/examples/xbrowsersync/compose.yaml

54 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-10-11 01:18:00 +08:00
version: "3.9"
services:
xbrowsersync-db:
#image: mongo:4.4.29
image: mongo:7.0.11
container_name: xbrowsersync-db
restart: always
networks:
- app_network
- site_network
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- ./db:/data/db
- ./backup:/data/backups
- ./conf/mongoconfig.js:/docker-entrypoint-initdb.d/mongoconfig.js
environment:
- "MONGO_INITDB_DATABASE=xbrowsersync"
- "MONGO_INITDB_ROOT_USERNAME=xbrowsersync"
- "MONGO_INITDB_ROOT_PASSWORD=12345678"
- "XBS_DB_NAME=xbrowsersync"
- "XBS_DB_USERNAME=xbrowsersync"
- "XBS_DB_PASSWORD=123456"
xbrowsersync:
image: xbrowsersync/api:1.1.13-node20.14.0-alpine
container_name: xbrowsersync
restart: always
networks:
- app_network
- site_network
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
#- ./conf/settings.json:/opt/xbs/1.1.13/conf/settings.json
#- ./logs:/var/log/xBrowserSync
- ./conf/settings.json:/usr/src/api/config/settings.json
- ./conf/healthcheck.js:/usr/src/api/healthcheck.js
- ./logs:/var/log/xBrowserSync
depends_on:
- "xbrowsersync-db"
healthcheck:
test: [ "CMD", "node", "/usr/src/api/healthcheck.js" ]
interval: "1m"
timeout: "10s"
retries: "5"
start_period: "30s"
networks:
app_network:
external: true
name: app_network
site_network:
external: true
name: site_network