|
| 1 | +# source: https://technotim.live/posts/pterodactyl-game-server/ |
| 2 | +version: '3.8' |
| 3 | +x-common: |
| 4 | + database: &db-environment |
| 5 | + MYSQL_PASSWORD: &db-password ${MYSQL_PASSWORD} |
| 6 | + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} |
| 7 | + panel: |
| 8 | + &panel-environment # This URL should be the URL that your reverse proxy routes to the panel server |
| 9 | + APP_URL: 'https://codinglab.gg' |
| 10 | + # A list of valid timezones can be found here: http://php.net/manual/en/timezones.php |
| 11 | + APP_TIMEZONE: 'Europe/Paris' |
| 12 | + APP_SERVICE_AUTHOR: '[email protected]' |
| 13 | + TRUSTED_PROXIES: '*' # Set this to your proxy IP |
| 14 | + # Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt |
| 15 | + # to generate an SSL certificate for the Panel. |
| 16 | + # LE_EMAIL: "" |
| 17 | + mail: &mail-environment |
| 18 | + |
| 19 | + MAIL_DRIVER: 'smtp' |
| 20 | + MAIL_HOST: 'mail' |
| 21 | + MAIL_PORT: '1025' |
| 22 | + MAIL_USERNAME: '' |
| 23 | + MAIL_PASSWORD: '' |
| 24 | + MAIL_ENCRYPTION: 'true' |
| 25 | + |
| 26 | +# ------------------------------------------------------------------------------------------ |
| 27 | +services: |
| 28 | + database: |
| 29 | + image: mariadb:10.5 |
| 30 | + restart: always |
| 31 | + command: --default-authentication-plugin=mysql_native_password |
| 32 | + volumes: |
| 33 | + - '/srv/pterodactyl/database:/var/lib/mysql' |
| 34 | + environment: |
| 35 | + <<: *db-environment |
| 36 | + MYSQL_DATABASE: 'panel' |
| 37 | + MYSQL_USER: 'pterodactyl' |
| 38 | + cache: |
| 39 | + image: redis:alpine |
| 40 | + restart: always |
| 41 | + panel: |
| 42 | + image: ghcr.io/pterodactyl/panel:latest |
| 43 | + restart: always |
| 44 | + ports: |
| 45 | + - '80:80' |
| 46 | + - '443:443' |
| 47 | + links: |
| 48 | + - database |
| 49 | + - cache |
| 50 | + volumes: |
| 51 | + - '/srv/pterodactyl/var/:/app/var/' |
| 52 | + - '/srv/pterodactyl/nginx/:/etc/nginx/http.d/' |
| 53 | + - '/srv/pterodactyl/certs/:/etc/letsencrypt/' |
| 54 | + - '/srv/pterodactyl/logs/:/app/storage/logs' |
| 55 | + environment: |
| 56 | + <<: [*panel-environment, *mail-environment] |
| 57 | + DB_PASSWORD: *db-password |
| 58 | + APP_ENV: 'production' |
| 59 | + APP_ENVIRONMENT_ONLY: 'false' |
| 60 | + CACHE_DRIVER: 'redis' |
| 61 | + SESSION_DRIVER: 'redis' |
| 62 | + QUEUE_DRIVER: 'redis' |
| 63 | + REDIS_HOST: 'cache' |
| 64 | + DB_HOST: 'database' |
| 65 | + DB_PORT: '3306' |
| 66 | +networks: |
| 67 | + default: |
| 68 | + ipam: |
| 69 | + config: |
| 70 | + - subnet: 172.20.0.0/16 |
0 commit comments