93 lines
2.8 KiB
YAML
93 lines
2.8 KiB
YAML
---
|
|
version: '3.8'
|
|
|
|
x-common:
|
|
database: &db-environment
|
|
MYSQL_PASSWORD: &db-password "${MYSQL_PASSWORD}"
|
|
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
|
|
panel:
|
|
&panel-environment
|
|
APP_URL: "https://${PANEL_HOST:-panel.mnke.org}"
|
|
# A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
|
|
APP_TIMEZONE: "America/Vancouver"
|
|
APP_SERVICE_AUTHOR: "${EMAIL:-tony@mnke.org}"
|
|
TRUSTED_PROXIES: "${TRUSTED_PROXIES:-*}"
|
|
# Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt
|
|
# to generate an SSL certificate for the Panel.
|
|
# LE_EMAIL: ""
|
|
mail: &mail-environment
|
|
MAIL_FROM: "${EMAIL:-tony@mnke.org}"
|
|
MAIL_DRIVER: "smtp"
|
|
MAIL_HOST: "mail"
|
|
MAIL_PORT: "${MAIL_PORT:-1025}"
|
|
MAIL_USERNAME: "${MAIL_USERNAME:-}"
|
|
MAIL_PASSWORD: "${MAIL_PASSWORD:-}"
|
|
MAIL_ENCRYPTION: "true"
|
|
|
|
services:
|
|
database:
|
|
image: mariadb:10.5
|
|
restart: always
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
networks:
|
|
- pterodactyl-panel
|
|
volumes:
|
|
- ${PTERODACTYL_DIRECTORY:-/mnt/docker/volumes/pterodactyl}/database:/var/lib/mysql
|
|
environment:
|
|
<<: *db-environment
|
|
MYSQL_DATABASE: "panel"
|
|
MYSQL_USER: "pterodactyl"
|
|
|
|
cache:
|
|
image: redis:7.4.2-alpine
|
|
restart: unless-stopped
|
|
networks:
|
|
- pterodactyl-panel
|
|
|
|
panel:
|
|
image: ghcr.io/pterodactyl/panel:latest
|
|
restart: unless-stopped
|
|
# ports:
|
|
# - "80:80"
|
|
# - "443:443"
|
|
networks:
|
|
- pterodactyl-panel
|
|
- traefik
|
|
volumes:
|
|
- ${PTERODACTYL_DIRECTORY:-/mnt/docker/volumes/pterodactyl}/var/:/app/var/
|
|
- ${PTERODACTYL_DIRECTORY:-/mnt/docker/volumes/pterodactyl}/nginx/:/etc/nginx/http.d/
|
|
- ${PTERODACTYL_DIRECTORY:-/mnt/docker/volumes/pterodactyl}/certs/:/etc/letsencrypt/
|
|
- ${PTERODACTYL_DIRECTORY:-/mnt/docker/volumes/pterodactyl}/logs/:/app/storage/logs
|
|
environment:
|
|
<<: [*panel-environment, *mail-environment]
|
|
DB_PASSWORD: *db-password
|
|
APP_ENV: "production"
|
|
APP_ENVIRONMENT_ONLY: "false"
|
|
CACHE_DRIVER: "redis"
|
|
SESSION_DRIVER: "redis"
|
|
QUEUE_DRIVER: "redis"
|
|
REDIS_HOST: "cache"
|
|
DB_HOST: "database"
|
|
DB_PORT: "3306"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.pterodactyl-panel.rule=Host(`${PANEL_HOST:-panel.mnke.org}`)"
|
|
- "traefik.http.routers.pterodactyl-panel.entrypoints=websecure"
|
|
- "traefik.http.routers.pterodactyl-panel.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.pterodactyl-panel.loadbalancer.server.port=80"
|
|
- "traefik.docker.network=traefik"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.50'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 128M
|
|
|
|
networks:
|
|
pterodactyl-panel:
|
|
name: pterodactyl-panel
|
|
traefik:
|
|
external: true
|