Fixes for docker compose formatting and missing storage dir

This commit is contained in:
Dane Everitt 2020-11-14 13:26:43 -08:00
parent fe725397eb
commit 83707079e8
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
3 changed files with 21 additions and 18 deletions

View File

@ -3,7 +3,7 @@ cd /app
mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \ mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \
&& chmod 777 /var/log/panel/logs/ \ && chmod 777 /var/log/panel/logs/ \
&& ln -s /var/log/panel/logs/ /app/storage/ && ln -s /var/log/panel/logs/ /app/storage/logs/
## check for .env file and generate app keys if missing ## check for .env file and generate app keys if missing
if [ -f /app/var/.env ]; then if [ -f /app/var/.env ]; then

View File

@ -19,10 +19,10 @@ RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar un
&& docker-php-ext-install bcmath gd pdo_mysql zip \ && docker-php-ext-install bcmath gd pdo_mysql zip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& cp .env.example .env \ && cp .env.example .env \
&& mkdir -p bootstrap/cache/ storage/framework/sessions storage/framework/views storage/framework/cache \ && mkdir -p bootstrap/cache/ storage/logs storage/framework/sessions storage/framework/views storage/framework/cache \
&& chmod 777 -R bootstrap storage \ && chmod 777 -R bootstrap storage \
&& composer install --no-dev --optimize-autoloader \ && composer install --no-dev --optimize-autoloader \
&& rm -rf .env bootstrap/cache/*.php storage \ && rm -rf .env bootstrap/cache/*.php \
&& chown -R nginx:nginx . && chown -R nginx:nginx .
RUN rm /usr/local/etc/php-fpm.d/www.conf.default \ RUN rm /usr/local/etc/php-fpm.d/www.conf.default \

View File

@ -1,19 +1,22 @@
version: '3.8' version: '3.8'
x-common: x-common:
database: &db-environment database:
&db-environment
# Do not remove the "&db-password" from the end of the line below, it is important # Do not remove the "&db-password" from the end of the line below, it is important
# for Panel functionality. # for Panel functionality.
MYSQL_PASSWORD: "CHANGE_ME" &db-password MYSQL_PASSWORD: &db-password "CHANGE_ME"
MYSQL_ROOT_PASSWORD: "CHANGE_ME_TOO" MYSQL_ROOT_PASSWORD: "CHANGE_ME_TOO"
panel: &panel-environment panel:
APP_URL: "https://your.domain.here" &panel-environment
APP_URL: "https://example.com"
# A list of valid timezones can be found here: http://php.net/manual/en/timezones.php # A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
APP_TIMEZONE: "UTC" APP_TIMEZONE: "UTC"
APP_SERVICE_AUTHOR: "noreply@example.com" 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 # 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. # to generate an SSL certificate for the Panel.
# LE_EMAIL: "" # LE_EMAIL: ""
mail: &mail-environment mail:
&mail-environment
MAIL_FROM: "noreply@example.com" MAIL_FROM: "noreply@example.com"
MAIL_DRIVER: "smtp" MAIL_DRIVER: "smtp"
MAIL_HOST: "mail" MAIL_HOST: "mail"
@ -37,8 +40,8 @@ services:
- "/srv/pterodactyl/database:/var/lib/mysql" - "/srv/pterodactyl/database:/var/lib/mysql"
environment: environment:
<<: *db-environment <<: *db-environment
MYSQL_DATABASE: "panel" MYSQL_DATABASE: "panel"
MYSQL_USER: "pterodactyl" MYSQL_USER: "pterodactyl"
cache: cache:
image: redis:alpine image: redis:alpine
restart: always restart: always
@ -59,14 +62,14 @@ services:
environment: environment:
<<: *panel-environment <<: *panel-environment
<<: *mail-environment <<: *mail-environment
DB_PASSWORD: *db-password DB_PASSWORD: *db-password
APP_ENV: "production" APP_ENV: "production"
APP_ENVIRONMENT_ONLY: "false" APP_ENVIRONMENT_ONLY: "false"
CACHE_DRIVER: "redis" CACHE_DRIVER: "redis"
SESSION_DRIVER: "redis" SESSION_DRIVER: "redis"
QUEUE_DRIVER: "redis" QUEUE_DRIVER: "redis"
REDIS_HOST: "cache" REDIS_HOST: "cache"
DB_HOST: "database" DB_HOST: "database"
networks: networks:
default: default:
ipam: ipam: