Guide - New Docker App
Time Required
1 - 2 Hours
Difficulty
Low
Step 1
Microstep
Create your portainer stack using the below compose and env file
Compose File
https://github.com/trentnbauer/agg.local/blob/main/docker-compose/pterodactyl-panel.yml
version: '3.8'
services:
database:
image: mariadb:10.11
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
volumes:
- db:/var/lib/mysql
- dbetc:/etc/mysql
networks:
- panel
environment:
MYSQL_PASSWORD: $MYSQL_PASS
MYSQL_ROOT_PASSWORD: $MYSQL_PASS_ROOT
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-proot", "--password=$MYSQL_PASS_ROOT"]
interval: 30s
timeout: 10s
retries: 5
labels:
- "autoheal=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
cache:
image: redis:alpine3.18
networks:
- panel
restart: unless-stopped
volumes:
- cache:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
labels:
- "autoheal=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
panel:
image: ghcr.io/pterodactyl/panel:v1.11.11@sha256:3ad185c83818944cfd4dba4dcefbca5ffb64655aaa63363f8f76ce41cd19873f
restart: unless-stopped
networks:
- panel
ports:
- ${PORT_HTTP:-80}:80
#dns:
# - 1.1.1.1
links:
- database
- cache
volumes:
- env:/app/var
environment:
MAIL_FROM: $MAIL_FROM
MAIL_DRIVER: "smtp"
MAIL_HOST: ${MAIL_SERVER:-smtp.gmail.com}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: $MAIL_USERNAME
MAIL_PASSWORD: $MAIL_PASS
MAIL_ENCRYPTION: "true"
APP_URL: ${SUBDOMAIN}${DOMAIN}
APP_TIMEZONE: $TZ
APP_SERVICE_AUTHOR: $MAIL_FROM
TRUSTED_PROXIES: "*"
DB_PASSWORD: $MYSQL_PASS
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"
HASHIDS_SALT: $HASHIDS_SALT #Refer to https://github.com/pterodactyl/panel/issues/5012#issuecomment-1960789655
HASHIDS_LENGTH: 8
healthcheck:
test: curl --connect-timeout 15 --silent --show-error --fail localhost:80
interval: 1m
timeout: 30s
retries: 3
start_period: 30s
labels:
- "autoheal=true"
- cloudflare.tunnel.enable=true
- cloudflare.tunnel.hostname=${SUBDOMAIN}${DOMAIN}
- cloudflare.tunnel.service=http://${HOSTNAME:-localhost}:${PORT_HTTP:-80}
- cloudflare.tunnel.access.policy=${CFPOLICY:-default_tld}
- cloudflare.tunnel.zonename=${DOMAIN}
- cloudflare.tunnel.path=${URLPATH:-}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
panel:
volumes:
cache:
db:
env:
dbetc:
.ENV FIle
TZ=Australia/Melbourne
Last updated
Was this helpful?