forked from Alex/Pterodactyl-Panel
key:generate is f'd
This commit is contained in:
parent
63b76c60fb
commit
87e125ddad
@ -7,15 +7,24 @@ cd /app
|
||||
if [ -f /app/var/.env ]; then
|
||||
echo "external vars exist"
|
||||
rm /app/.env
|
||||
|
||||
ln -s /app/var/.env /app/
|
||||
else
|
||||
echo "external vars don't exist"
|
||||
php artisan key:generate --force
|
||||
cp /app/.env /app/var/
|
||||
rm /app/.env
|
||||
touch /app/var/.env
|
||||
|
||||
## manually generate a key because key generate --force fails
|
||||
echo -e "Generating key"
|
||||
APP_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo -e "Generated app key: $APP_KEY"
|
||||
echo -e "APP_KEY=$APP_KEY" > /app/var/.env
|
||||
|
||||
ln -s /app/var/.env /app/
|
||||
fi
|
||||
|
||||
## check for DB up before starting the panel
|
||||
echo "Checking database status."
|
||||
zshoecho "Checking database status."
|
||||
until nc -z -v -w30 $DB_HOST 3306
|
||||
|
||||
do
|
||||
@ -32,7 +41,7 @@ echo -e "Done\n"
|
||||
## start php-fpm in the background
|
||||
echo -e "Starting php-fpm in the background. \n"
|
||||
php-fpm7 -D
|
||||
echo -e "php-fpm starte.d \n"
|
||||
echo -e "php-fpm started \n"
|
||||
|
||||
## start webserver
|
||||
echo -e "Starting nginx in the foreground. \n"
|
||||
|
@ -9,10 +9,10 @@ COPY . ./
|
||||
|
||||
RUN cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf \
|
||||
&& cp .dev/docker/www.conf /etc/php7/php-fpm.d/www.conf \
|
||||
&& echo "APP_ENVIRONMENT_ONLY=false" > /app/.env \
|
||||
&& echo "APP_KEY=" >> /app/.env \
|
||||
&& mkdir /var/run/php \
|
||||
&& composer install --no-dev
|
||||
&& cp .env.example .env \
|
||||
&& composer install --no-dev --optimize-autoloader \
|
||||
&& rm .env
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
|
@ -23,6 +23,7 @@ services:
|
||||
- cache
|
||||
volumes:
|
||||
- "/srv/pterodactyl/var/:/app/var/"
|
||||
- "/srv/pterodactyl/certs/:/"
|
||||
environment:
|
||||
## These are defaults and should be left alone
|
||||
- "APP_ENV=production"
|
||||
@ -34,6 +35,7 @@ services:
|
||||
- "QUEUE_HIGH=high"
|
||||
- "QUEUE_STANDARD=standard"
|
||||
- "QUEUE_LOW=low"
|
||||
## Cache settings
|
||||
- "CACHE_DRIVER=redis"
|
||||
- "SESSION_DRIVER=redis"
|
||||
- "QUEUE_DRIVER=redis"
|
||||
|
Loading…
Reference in New Issue
Block a user