AVA-docker/docker-compose.yml

110 lines
4.0 KiB
YAML
Raw Normal View History

2024-02-06 08:42:50 +00:00
version: '3'
services:
traefik:
2024-02-14 11:02:14 +00:00
image: traefik
2024-02-06 08:42:50 +00:00
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
2024-02-14 11:02:14 +00:00
#- /var/run/docker.sock:/var/run/docker.sock
- "////./pipe/docker_engine:/var/run/docker.sock"
- ./traefik.yml:/etc/traefik/traefik.yml
- ./authorized_users:/etc/traefik/authorized_users
- ./acme.json:/acme.json
2024-02-06 08:42:50 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard-http.entrypoints=http"
2024-02-14 11:02:14 +00:00
- "traefik.http.routers.dashboard-http.rule=Host(`localhost/`)"
2024-02-06 08:42:50 +00:00
- "traefik.http.routers.dashboard-http.middlewares=dashboard-redirect"
- "traefik.http.middlewares.dashboard-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.dashboard-https.entrypoints=https"
2024-02-14 11:02:14 +00:00
- "traefik.http.routers.dashboard-https.rule=(Host(`localhost/`)) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
2024-02-06 08:42:50 +00:00
- "traefik.http.routers.dashboard-https.tls.certResolver=letsencrypt"
- "traefik.http.routers.dashboard-https.service=api@internal"
- "traefik.http.routers.dashboard-https.middlewares=dashboard-auth"
- "traefik.http.middlewares.dashboard-auth.basicauth.usersfile=/etc/traefik/authorized_users"
2024-02-14 11:02:14 +00:00
command:
# Enable Docker in Traefik, so that it reads labels from Docker services
- --providers.docker
# Add a constraint to only use services with the label "traefik.constraint-label=traefik-public"
#- --providers.docker.constraints=Label(`traefik.constraint-label`, `traefik-public`)
# Do not expose all Docker services, only the ones explicitly exposed
#- --providers.docker.exposedbydefault=false
# Enable Docker Swarm mode
- --providers.docker.swarmmode
# Create an entrypoint "http" listening on port 80
- --entrypoints.http.address=:80
# Create an entrypoint "https" listening on port 443
- --entrypoints.https.address=:443
# Create the certificate resolver "le" for Let's Encrypt, uses the environment variable EMAIL
#- --certificatesresolvers.le.acme.email='cboivin@secure-exchanges.com'#$EMAIL
# Store the Let's Encrypt certificates in the mounted volume
#- --certificatesresolvers.le.acme.storage=/certificates/acme.json
# Use the TLS Challenge for Let's Encrypt
#- --certificatesresolvers.le.acme.tlschallenge=true
# Enable the access log, with HTTP requests
- --accesslog
# Enable the Traefik log, for configurations and errors
- --log
# Enable the Dashboard and API
- --api.insecure=true
2024-02-06 08:42:50 +00:00
2024-02-14 11:02:14 +00:00
# Docker engine
- --providers.docker.endpoint=npipe:////./pipe/docker_engine
2024-02-06 08:42:50 +00:00
2024-05-11 14:36:56 +00:00
minecraft-test-docker:
image: itzg/minecraft-server
2024-05-11 16:48:56 +00:00
restart: "unless-stopped"
stdin_open: true
2024-02-06 08:42:50 +00:00
volumes:
2024-05-11 16:48:56 +00:00
- ./mc/data:/data
- ./mc/mods:/mods:ro
- ./mc/icon.png:/icon.png
- ./mc/whitelist.json:/whitelist.json
depends_on:
- lazytainer
network_mode: service:lazytainer
labels:
- "lazytainer.group=minecraft"
2024-02-06 08:42:50 +00:00
environment:
2024-05-11 14:36:56 +00:00
EULA: "TRUE"
TYPE: FORGE
VERSION: "1.20.1"
FORGE_VERSION: "47.2.32"
2024-05-11 16:48:56 +00:00
INIT_MEMORY: 128M
MAX_MEMORY: 25G
2024-05-11 14:36:56 +00:00
TZ: "Europe/Berne"
2024-05-11 16:48:56 +00:00
ICON: "/icon.png"
SNOOPER_ENABLED: "FALSE"
#SEED: ""
2024-05-11 14:36:56 +00:00
OVERRIDE_SERVER_PROPERTIES: "TRUE"
MAX_TICK_TIME: "-1"
DIFFICULTY: "normal"
2024-05-11 16:48:56 +00:00
MODE: "survival" # survival, creative, adventure, spectator
MOTD: "Bachelor's Minecraft Server"
ENABLE_WHITELIST: "TRUE"
WHITELIST_FILE: "/whitelist.json"
OVERRIDE_WHITELIST: "TRUE"
2024-02-26 08:08:06 +00:00
2024-02-26 10:19:04 +00:00
lazytainer:
image: ghcr.io/vmorganp/lazytainer:master
environment:
VERBOSE: false
ports:
- 25565:25565
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- lazytainer.group.minecraft.sleepMethod=stop
- lazytainer.group.minecraft.ports=25565
- lazytainer.group.minecraft.minPacketThreshold=2 # Start after two incomming packets
2024-05-11 16:48:56 +00:00
- lazytainer.group.minecraft.inactiveTimeout=300
2024-02-26 10:19:04 +00:00
restart: unless-stopped
network_mode: bridge