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
&& tar --strip-components=1 -xzvf ${PANEL_VERSION}.tar.gz \
&& rm "${PANEL_VERSION}.tar.gz" \
&& 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 \
&& composer install --ansi --no-dev \
&& mv ./storage storage.template \
&& chown nginx:nginx * -R
COPY ./manifest /
......
......@@ -48,7 +48,6 @@ services:
- SSL=false
- SSL_CERT=/certs/live/localhost/fullchain.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.
# When doing migration, the container will attempt to get the environment
......@@ -69,11 +68,7 @@ services:
- MAIL_DRIVER=mail
- MAIL_EMAIL=admin@localhost
- MAIL_FROM_NAME=Test Panel
- USER_EMAIL=admin@pterodactyl.io
- USER_PASS=PlsCh@ng3M3
- USER_IS_ADMIN=true
image: quay.io/ccarney/pterodactyl-panel:v0.6.0-rc.1
image: quay.io/ccarney/pterodactyl-panel:testing
ports:
- 80:80
- 443:443
......
......@@ -32,10 +32,16 @@ function init {
initConfig
}
# Build the config only
function initConfig {
# Might looks like overkill, however we should optimize and clear the config cache
php artisan optimize
php artisan config:cache
# Create the storage directory
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
rm .env -rf
......@@ -55,17 +61,21 @@ function initConfig {
# Updates a configuration using variables from the .env file and shell variables
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 \
--url=${PANEL_URL} \
--dbhost=${DB_HOST} \
--dbport=${DB_PORT} \
--dbname=${DB_DATABASE} \
--dbuser=${DB_USERNAME} \
--dbpass=${DB_PASSWORD} \
--driver=${CACHE_DRIVER} \
--url="${PANEL_URL}" \
--dbhost="${DB_HOST}" \
--dbport="${DB_PORT}" \
--dbname="${DB_DATABASE}" \
--dbuser="${DB_USERNAME}" \
--dbpass="${DB_PASSWORD}" \
--driver="${CACHE_DRIVER}" \
--session-driver=database \
--queue-driver=database \
--timezone=${TIMEZONE}
--timezone="${TIMEZONE}"
php artisan pterodactyl:mail -n \
--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