misc_pterodactyl-panel/docker-compose.example.yml
Matthew Hugley cfb5b8c244
Updated formatting for the docker compose file to fix a error. (#3421)
This fixes the error message "There is an error in the yaml syntax: YAMLSemanticError: Map keys must be unique; "<<" is repeated" which is received if trying to deploy the docker compose using portainer it will not even allow you to click the button because of the formatting error. This is a page showing a example of what I did "http://yaml.org/type/merge.html" Instead of 2 merge requests docker/portainer only allows 1 merge request in this situation so they had to be combined into 1 line instead of 2.
2021-08-02 20:44:55 -07:00

77 lines
2.2 KiB
YAML

version: '3.8'
x-common:
database:
&db-environment
# Do not remove the "&db-password" from the end of the line below, it is important
# for Panel functionality.
MYSQL_PASSWORD: &db-password "CHANGE_ME"
MYSQL_ROOT_PASSWORD: "CHANGE_ME_TOO"
panel:
&panel-environment
APP_URL: "https://example.com"
# A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
APP_TIMEZONE: "UTC"
APP_SERVICE_AUTHOR: "noreply@example.com"
# 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: "noreply@example.com"
MAIL_DRIVER: "smtp"
MAIL_HOST: "mail"
MAIL_PORT: "1025"
MAIL_USERNAME: ""
MAIL_PASSWORD: ""
MAIL_ENCRYPTION: "true"
#
# ------------------------------------------------------------------------------------------
# DANGER ZONE BELOW
#
# The remainder of this file likely does not need to be changed. Please only make modifications
# below if you understand what you are doing.
#
services:
database:
image: library/mysql:8.0
restart: always
command: --default-authentication-plugin=mysql_native_password
volumes:
- "/srv/pterodactyl/database:/var/lib/mysql"
environment:
<<: *db-environment
MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl"
cache:
image: redis:alpine
restart: always
panel:
image: ghcr.io/pterodactyl/panel:latest
restart: always
ports:
- "80:80"
- "443:443"
links:
- database
- cache
volumes:
- "/srv/pterodactyl/var/:/app/var/"
- "/srv/pterodactyl/nginx/:/etc/nginx/conf.d/"
- "/srv/pterodactyl/certs/:/etc/letsencrypt/"
- "/srv/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"
networks:
default:
ipam:
config:
- subnet: 172.20.0.0/16