mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-01-18 16:27:25 +01:00
76 lines
2.7 KiB
YAML
76 lines
2.7 KiB
YAML
# Maintainer: Mickael "PAPAMICA" Asseline
|
|
# Update: 2022-06-28
|
|
|
|
#& type: 3
|
|
#& title: xBrowserSync
|
|
#& description: xBrowserSync is a free and open-source alternative to browser syncing tools.
|
|
#& note: Website: <a href='https://www.xbrowsersync.org/' target='_blank' rel='noopener'>xbrowsersync.org</a></br></br>Warning! You need to clone this repo before: <a href='https://github.com/xbrowsersync/api-docker/' target='_blank' rel='noopener'>Github.com</a>
|
|
#& categories: SelfHosted, PAPAMICA
|
|
#& platform: linux
|
|
#& logo: https://img.papamica.com/logo/xbrowsersync.png
|
|
|
|
#% SERVICE: Name of the service (No spaces or points) [xBrowserSync]
|
|
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
|
|
#% URL: Service URL (Example: service.papamica.fr or service.com)
|
|
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
|
|
#% DB_USER: Database user (No spaces or points) [xBrowserSync]
|
|
#% DB_PASSWORD: Database user password
|
|
|
|
# Work with Portainer
|
|
version: "3.7"
|
|
|
|
services:
|
|
db:
|
|
container_name: $SERVICE-db
|
|
environment:
|
|
- MONGO_INITDB_DATABASE=$SERVICE
|
|
- MONGO_INITDB_ROOT_PASSWORD=$DB_PASSWORD
|
|
- MONGO_INITDB_ROOT_USERNAME=$DB_USER
|
|
- XBS_DB_NAME=$SERVICE
|
|
- XBS_DB_PASSWORD=$DB_PASSWORD
|
|
- XBS_DB_USERNAME=$DB_USER
|
|
image: mongo:4.4.4
|
|
restart: unless-stopped
|
|
volumes:
|
|
- $DATA_LOCATION/$SERVICE/data:/data/db
|
|
- $DATA_LOCATION/$SERVICE/backups:/data/backups
|
|
- $DATA_LOCATION/$SERVICE/mongoconfig.js:/docker-entrypoint-initdb.d/mongoconfig.js
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
networks:
|
|
- default
|
|
|
|
api:
|
|
container_name: $SERVICE-api
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- XBROWSERSYNC_DB_PWD=$DB_PASSWORD
|
|
- XBROWSERSYNC_DB_USER=$DB_USER
|
|
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:
|
|
- $DATA_LOCATION/$SERVICE/settings.json:/usr/src/api/config/settings.json
|
|
- $DATA_LOCATION/$SERVICE/healthcheck.js:/usr/src/api/healthcheck.js
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.$SERVICE.entrypoints=https"
|
|
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
|
|
- "traefik.http.routers.$SERVICE.tls=true"
|
|
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
|
|
- "traefik.http.services.$SERVICE.loadbalancer.server.port=8080"
|
|
- "traefik.docker.network=$NETWORK"
|
|
networks:
|
|
- default
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: $NETWORK |