container/Composer/meshcentral/docker-compose.yml
Henrik 9fa6b16bed added meshcentral
added treafik
2023-05-06 20:21:09 +00:00

54 lines
1.8 KiB
YAML

version: '3'
networks:
meshcentral-tier:
driver: bridge
proxy:
external: true
services:
mongodb:
restart: always
container_name: mongodb
image: mongo:latest
env_file:
- .env
volumes:
# mongodb data-directory - A must for data persistence
- ./data/mongodb_data:/data/db
networks:
- meshcentral-tier
meshcentral:
restart: always
container_name: meshcentral
# use the official meshcentral container
image: ghcr.io/ylianst/meshcentral:latest
depends_on:
- mongodb
#ports:
# 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
#- 443:443
#- 80:80
env_file:
- .env
volumes:
# config.json and other important files live here. A must for data persistence
- ./data/meshcentral/data:/opt/meshcentral/meshcentral-data
# where file uploads for users live
- ./data/meshcentral/user_files:/opt/meshcentral/meshcentral-files
# location for the meshcentral-backups - this should be mounted to an external storage
- ./data/meshcentral/backup:/opt/meshcentral/meshcentral-backups
# location for site customization files
- ./data/meshcentral/web:/opt/meshcentral/meshcentral-web
labels:
- 'traefik.enable=true'
- "traefik.http.routers.mesh.entrypoints=websecure"
- "traefik.http.routers.mesh.rule=Host(`mesh.dev.mertens.digital`)"
- "traefik.http.routers.mesh.tls=true"
- "traefik.http.routers.mesh.tls.certresolver=letsencrypt"
- "traefik.http.services.mesh.loadbalancer.server.port=80"
#- "traefik.http.services.mesh.loadbalancer.server.scheme=https"
networks:
- meshcentral-tier
- proxy