Commit 11db638a authored by Cameron Carney's avatar Cameron Carney

storage is now consistent

parent c662a524
...@@ -23,8 +23,10 @@ RUN curl -Lo "${PANEL_VERSION}.tar.gz" https://github.com/Pterodactyl/Panel/arch ...@@ -23,8 +23,10 @@ RUN curl -Lo "${PANEL_VERSION}.tar.gz" https://github.com/Pterodactyl/Panel/arch
&& tar --strip-components=1 -xzvf ${PANEL_VERSION}.tar.gz \ && tar --strip-components=1 -xzvf ${PANEL_VERSION}.tar.gz \
&& rm "${PANEL_VERSION}.tar.gz" \ && rm "${PANEL_VERSION}.tar.gz" \
&& chmod -R 777 storage/* bootstrap/cache \ && chmod -R 777 storage/* bootstrap/cache \
&& cp ./storage storage.template -rp \
&& 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 \
&& composer install --ansi --no-dev \ && composer install --ansi --no-dev \
&& mv ./storage storage.template \
&& chown nginx:nginx * -R && chown nginx:nginx * -R
COPY ./manifest / COPY ./manifest /
......
...@@ -48,7 +48,6 @@ services: ...@@ -48,7 +48,6 @@ services:
- SSL=false - SSL=false
- SSL_CERT=/certs/live/localhost/fullchain.pem - SSL_CERT=/certs/live/localhost/fullchain.pem
- SSL_CERT_KEY=/certs/live/localhost/privkey.pem - SSL_CERT_KEY=/certs/live/localhost/privkey.pem
- SSL_LE_WEBROOT=/certs/.webroot/ # Webroot for Let's Encrypt
# Panel Variables, These are only needed when doing initial setup. # Panel Variables, These are only needed when doing initial setup.
# When doing migration, the container will attempt to get the environment # When doing migration, the container will attempt to get the environment
...@@ -69,11 +68,7 @@ services: ...@@ -69,11 +68,7 @@ services:
- MAIL_DRIVER=mail - MAIL_DRIVER=mail
- MAIL_EMAIL=admin@localhost - MAIL_EMAIL=admin@localhost
- MAIL_FROM_NAME=Test Panel - MAIL_FROM_NAME=Test Panel
image: quay.io/ccarney/pterodactyl-panel:testing
- USER_EMAIL=admin@pterodactyl.io
- USER_PASS=PlsCh@ng3M3
- USER_IS_ADMIN=true
image: quay.io/ccarney/pterodactyl-panel:v0.6.0-rc.1
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
......
...@@ -32,10 +32,16 @@ function init { ...@@ -32,10 +32,16 @@ function init {
initConfig initConfig
} }
# Build the config only
function initConfig { function initConfig {
# Might looks like overkill, however we should optimize and clear the config cache
php artisan optimize # Create the storage directory
php artisan config:cache if [ ! -d /data/storage ]; then
cp ./storage.template /data/storage -pr
fi
rm -rf ./storage
ln -s /data/storage ./storage
# Always destroy .env on startup # Always destroy .env on startup
rm .env -rf rm .env -rf
...@@ -55,17 +61,21 @@ function initConfig { ...@@ -55,17 +61,21 @@ function initConfig {
# Updates a configuration using variables from the .env file and shell variables # Updates a configuration using variables from the .env file and shell variables
function updateConfiguration { function updateConfiguration {
# Might looks like overkill, however we should optimize and clear the config cache
php artisan optimize
php artisan config:cache
php artisan pterodactyl:env -n \ php artisan pterodactyl:env -n \
--url=${PANEL_URL} \ --url="${PANEL_URL}" \
--dbhost=${DB_HOST} \ --dbhost="${DB_HOST}" \
--dbport=${DB_PORT} \ --dbport="${DB_PORT}" \
--dbname=${DB_DATABASE} \ --dbname="${DB_DATABASE}" \
--dbuser=${DB_USERNAME} \ --dbuser="${DB_USERNAME}" \
--dbpass=${DB_PASSWORD} \ --dbpass="${DB_PASSWORD}" \
--driver=${CACHE_DRIVER} \ --driver="${CACHE_DRIVER}" \
--session-driver=database \ --session-driver=database \
--queue-driver=database \ --queue-driver=database \
--timezone=${TIMEZONE} --timezone="${TIMEZONE}"
php artisan pterodactyl:mail -n \ php artisan pterodactyl:mail -n \
--driver="${MAIL_DRIVER}" \ --driver="${MAIL_DRIVER}" \
......
# Prevents nginx from going into the background
daemon off;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment