64 lines
3.0 KiB
YAML
64 lines
3.0 KiB
YAML
services:
|
|
meshcentral-config:
|
|
image: alpine/git:latest
|
|
container_name: meshcentral-config
|
|
restart: "no"
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- /srv/docker/meshcentral/data:/data
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
apk add --no-cache gettext jq > /dev/null
|
|
rm -rf /tmp/repo
|
|
git clone --depth 1 https://oauth2:${GITEA_TOKEN}@gitea.${DOMAIN_NAME}/you/meshcentral-config.git /tmp/repo
|
|
envsubst < /tmp/repo/config.json.template > /tmp/config.rendered.json
|
|
jq empty /tmp/config.rendered.json
|
|
cp /tmp/config.rendered.json /data/config.json
|
|
|
|
meshcentral:
|
|
restart: unless-stopped
|
|
container_name: meshcentral
|
|
image: typhonragewind/meshcentral:latest
|
|
depends_on:
|
|
meshcentral-config:
|
|
condition: service_completed_successfully
|
|
#ports:
|
|
# - 8090:443 #MeshCentral will moan and try everything not to use port 80, but you can also use it if you so desire, just change the config.json according to your needs
|
|
environment:
|
|
- HOSTNAME=${SERVICE_NAME}.${DOMAIN_NAME} #your hostname
|
|
- REVERSE_PROXY=false #set to your reverse proxy IP if you want to put meshcentral behind a reverse proxy
|
|
- REVERSE_PROXY_TLS_PORT=
|
|
# NOTE: IFRAME/ALLOW_NEW_ACCOUNTS/WEBRTC below only apply if config.json is regenerated from scratch (fresh volume).
|
|
- IFRAME=false
|
|
- ALLOW_NEW_ACCOUNTS=false #set to false if you want disable self-service creation of new accounts besides the first (admin)
|
|
- WEBRTC=false
|
|
- BACKUPS_PW=${BACKUP_PASSWORD}
|
|
- BACKUP_INTERVAL=24 #interval in hours for the autobackup function
|
|
- BACKUP_KEEP_DAYS=10 #number of days of backups the function keeps
|
|
volumes:
|
|
- /srv/docker/meshcentral/data:/opt/meshcentral/meshcentral-data #config.json and other important files live here
|
|
- /srv/docker/meshcentral/user_files:/opt/meshcentral/meshcentral-files #where file uploads for users live
|
|
- /srv/docker/meshcentral/backups:/opt/meshcentral/meshcentral-backups #encrypted backups land here
|
|
networks:
|
|
- traefik_network
|
|
labels:
|
|
### Traefik Labels
|
|
- traefik.enable=true
|
|
- traefik.http.routers.${SERVICE_NAME}-https.tls=true
|
|
- traefik.http.routers.${SERVICE_NAME}-https.tls.certresolver=cloudflare
|
|
- traefik.http.routers.${SERVICE_NAME}-https.entrypoints=websecure
|
|
- traefik.http.routers.${SERVICE_NAME}-https.rule=Host(`${SERVICE_NAME}.${DOMAIN_NAME}`)
|
|
- traefik.http.services.${SERVICE_NAME}-https.loadbalancer.server.port=443
|
|
### Monitor with uptime-kuma
|
|
- kuma.monitoring.group.name=Docker Containers
|
|
- kuma.${SERVICE_NAME}.docker.parent_name=monitoring
|
|
- kuma.${SERVICE_NAME}.docker.name=${SERVICE_NAME}
|
|
- kuma.${SERVICE_NAME}.docker.type=docker
|
|
- kuma.${SERVICE_NAME}.docker.docker_container=${SERVICE_NAME}
|
|
- kuma.${SERVICE_NAME}.docker.docker_host=1
|
|
- 'kuma.${SERVICE_NAME}.docker.tag_names=[{"name": "docker_tag"}]'
|
|
networks:
|
|
traefik_network:
|
|
external: true |