Advertisement
Guest User

panel docker-compose.yml

a guest
Feb 15th, 2021
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.65 KB | None | 0 0
  1. version: '3.8'
  2. x-common:
  3.   database:
  4.    &db-environment
  5.     # Do not remove the "&db-password" from the end of the line below, it is important
  6.     # for Panel functionality.
  7.     MYSQL_PASSWORD: &db-password "secret"
  8.     MYSQL_ROOT_PASSWORD: "secret"
  9.   panel:
  10.    &panel-environment
  11.     APP_URL: "https://panel.argonaut.network"
  12.     # A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
  13.     APP_TIMEZONE: "UTC"
  14.     APP_SERVICE_AUTHOR: "[email protected]"
  15.     # Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt
  16.     # to generate an SSL certificate for the Panel.
  17.     # LE_EMAIL: ""
  18.   mail:
  19.    &mail-environment
  20.     MAIL_FROM: "[email protected]"
  21.     MAIL_DRIVER: "smtp"
  22.     MAIL_HOST: "mail"
  23.     MAIL_PORT: "1025"
  24.     MAIL_USERNAME: ""
  25.     MAIL_PASSWORD: ""
  26.     MAIL_ENCRYPTION: "true"
  27.  
  28. #
  29. # ------------------------------------------------------------------------------------------
  30. # DANGER ZONE BELOW
  31. #
  32. # The remainder of this file likely does not need to be changed. Please only make modifications
  33. # below if you understand what you are doing.
  34. #
  35. services:
  36.   database:
  37.     image: library/mysql:8.0
  38.     restart: always
  39.     command: --default-authentication-plugin=mysql_native_password
  40.     volumes:
  41.      - "/srv/pterodactyl/database:/var/lib/mysql"
  42.     environment:
  43.       <<: *db-environment
  44.       MYSQL_DATABASE: "panel"
  45.       MYSQL_USER: "pterodactyl"
  46.     networks:
  47.      - backend
  48.   cache:
  49.     image: redis:alpine
  50.     restart: always
  51.     networks:
  52.      - backend
  53.   panel:
  54.     image: ghcr.io/pterodactyl/panel:latest
  55.     restart: always
  56.     links:
  57.      - database
  58.       - cache
  59.     volumes:
  60.      - "/srv/pterodactyl/var/:/app/var/"
  61.       - "/srv/pterodactyl/nginx/:/etc/nginx/conf.d/"
  62.       - "/srv/pterodactyl/certs/:/etc/letsencrypt/"
  63.       - "/srv/pterodactyl/logs/:/var/log/"
  64.     environment:
  65.       <<: *panel-environment
  66.       <<: *mail-environment
  67.       DB_PASSWORD: *db-password
  68.       APP_ENV: "production"
  69.       APP_ENVIRONMENT_ONLY: "false"
  70.       CACHE_DRIVER: "redis"
  71.       SESSION_DRIVER: "redis"
  72.       QUEUE_DRIVER: "redis"
  73.       REDIS_HOST: "cache"
  74.       DB_HOST: "database"
  75.     networks:
  76.      - proxy
  77.       # Specifically for stacks with internally-networked services, such as a db
  78.       - backend
  79.     labels:
  80.      - "traefik.enable=true"
  81.      
  82.       # Accept HTTP and upgrade to HTTPS
  83.       - "traefik.http.routers.ptero.entrypoints=http"
  84.       - "traefik.http.routers.ptero.rule=HostHeader(`panel.argonaut.network`)"
  85.       - "traefik.http.routers.ptero.rule=Host(`panel.argonaut.network`)"
  86.       - "traefik.http.middlewares.ptero-https-redirect.redirectscheme.scheme=https"
  87.       - "traefik.http.routers.ptero.middlewares=ptero-https-redirect"
  88.      
  89.       # Define secure entry point
  90.       - "traefik.http.routers.ptero-secure.entrypoints=https"
  91.       - "traefik.http.routers.ptero-secure.rule=HostHeader(`panel.argonaut.network`)"
  92.       - "traefik.http.routers.ptero-secure.rule=Host(`panel.argonaut.network`)"
  93.       - "traefik.http.routers.ptero-secure.tls=true"
  94.       - "traefik.http.routers.ptero-secure.tls.certresolver=http"
  95.      
  96.       # Attach this container to the reverse proxy network.
  97.       - "traefik.docker.network=proxy"
  98.      
  99.       # Used for apps that expose multiple ports. Not common.
  100.       #- "traefik.http.routers.ptero-secure.service=ptero"
  101.       #- "traefik.http.services.ptero.loadbalancer.server.port=9000"
  102. networks:
  103.   default:
  104.     ipam:
  105.       config:
  106.         - subnet: 172.20.0.0/16
  107.   proxy:
  108.     external: true
  109.   # Specifically for stacks with internally-networked services, such as a db
  110.   backend:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement