add pterodactyl worker service as seperate docker container, add healthchecks where possible

This commit is contained in:
2025-10-06 21:14:16 +02:00
parent 2fe1cdf495
commit 4ef46ac852
2 changed files with 67 additions and 0 deletions

View File

@@ -23,3 +23,9 @@ services:
net.unraid.docker.icon: ''
net.unraid.docker.webui: ''
net.unraid.docker.shell: ''
pterodactyl-worker:
labels:
net.unraid.docker.managed: 'composeman'
net.unraid.docker.icon: ''
net.unraid.docker.webui: ''
net.unraid.docker.shell: ''

View File

@@ -10,6 +10,11 @@ services:
- "/mnt/user/pterodactyl-node:/etc/pterodactyl" #Appdata - #Where config.yml goes into.
- "/mnt/user/pterodactyl-node/data:/mnt/user/pterodactyl-node/data" #Shared data between Panel and Node/Wings.
- "/mnt/user/appdata/pterodactyl-panel/nginx/:/etc/nginx/conf.d/" #Nginx Config
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
environment:
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: false
@@ -39,6 +44,50 @@ services:
DB_DATABASE: "pterodactyl"
labels:
folder.view2: "Game Servers"
pterodactyl-worker:
image: ccarney16/pterodactyl-panel:latest
container_name: pterodactyl-worker
command: php /var/www/html/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
environment: # same env as the panel
APP_ENV: "production"
APP_ENVIRONMENT_ONLY: false
APP_SERVICE_AUTHOR: "tonitrus888@gmail.com"
APP_URL: "https://panel.homecube.org"
APP_TIMEZONE: "Europe/Vienna"
CACHE_DRIVER: "redis" #DON'T TOUCH
SESSION_DRIVER: "redis" #DON'T TOUCH
QUEUE_DRIVER: "redis" #DON'T TOUCH
REDIS_HOST: "redisdb"
REDIS_PORT: 6379
REDIS_USERNAME: "pterodactyl"
REDIS_PASSWORD: "Unmoral-Spoof-Conjure-Gender-Precut8-Attempt"
MAIL_FROM: "tonitrus888@gmail.com"
MAIL_DRIVER: "smtp"
MAIL_HOST: "smtp.gmail.com"
MAIL_PORT: "587"
MAIL_USERNAME: "tonitrus888@gmail.com"
MAIL_PASSWORD: "orlg mofu ehap ehhp"
MAIL_ENCRYPTION: true
APP_DEBUG: true
TRUSTED_PROXIES: "10.0.0.1"
DB_HOST: "mariadb"
DB_PORT: 3306
DB_USERNAME: "pterodactyl-admin"
DB_PASSWORD: "Raving-Swell-Lend3-Pliable-Semicolon-Providing"
DB_DATABASE: "pterodactyl"
volumes:
- "/mnt/user/appdata/pterodactyl-panel/appdata/:/data" #Appdata of Container
- "/mnt/user/pterodactyl-node:/etc/pterodactyl" #Appdata - #Where config.yml goes into.
- "/mnt/user/pterodactyl-node/data:/mnt/user/pterodactyl-node/data" #Shared data between Panel and Node/Wings.
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
labels:
folder.view2: "Game Servers"
wings:
image: ccarney16/pterodactyl-daemon:latest
@@ -68,6 +117,12 @@ services:
MARIADB_ROOT_PASSWORD: asdkljflkj§/&$%("§/%(njdfklajseslif)")
volumes:
- /mnt/user/database/mariadb:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
labels:
folder.view2: "Databases"
@@ -82,5 +137,11 @@ services:
volumes:
- /mnt/user/database/redis/users.acl:/usr/local/etc/redis/users.acl
- /mnt/user/database/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
labels:
folder.view2: "Databases"