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
|
if [ -f /app/var/.env ]; then
|
||||||
echo "external vars exist"
|
echo "external vars exist"
|
||||||
rm /app/.env
|
rm /app/.env
|
||||||
|
|
||||||
ln -s /app/var/.env /app/
|
ln -s /app/var/.env /app/
|
||||||
else
|
else
|
||||||
echo "external vars don't exist"
|
echo "external vars don't exist"
|
||||||
php artisan key:generate --force
|
rm /app/.env
|
||||||
cp /app/.env /app/var/
|
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
|
fi
|
||||||
|
|
||||||
## check for DB up before starting the panel
|
## check for DB up before starting the panel
|
||||||
echo "Checking database status."
|
zshoecho "Checking database status."
|
||||||
until nc -z -v -w30 $DB_HOST 3306
|
until nc -z -v -w30 $DB_HOST 3306
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -32,7 +41,7 @@ echo -e "Done\n"
|
||||||
## start php-fpm in the background
|
## start php-fpm in the background
|
||||||
echo -e "Starting php-fpm in the background. \n"
|
echo -e "Starting php-fpm in the background. \n"
|
||||||
php-fpm7 -D
|
php-fpm7 -D
|
||||||
echo -e "php-fpm starte.d \n"
|
echo -e "php-fpm started \n"
|
||||||
|
|
||||||
## start webserver
|
## start webserver
|
||||||
echo -e "Starting nginx in the foreground. \n"
|
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 \
|
RUN cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf \
|
||||||
&& cp .dev/docker/www.conf /etc/php7/php-fpm.d/www.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 \
|
&& mkdir /var/run/php \
|
||||||
&& composer install --no-dev
|
&& cp .env.example .env \
|
||||||
|
&& composer install --no-dev --optimize-autoloader \
|
||||||
|
&& rm .env
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ services:
|
||||||
- cache
|
- cache
|
||||||
volumes:
|
volumes:
|
||||||
- "/srv/pterodactyl/var/:/app/var/"
|
- "/srv/pterodactyl/var/:/app/var/"
|
||||||
|
- "/srv/pterodactyl/certs/:/"
|
||||||
environment:
|
environment:
|
||||||
## These are defaults and should be left alone
|
## These are defaults and should be left alone
|
||||||
- "APP_ENV=production"
|
- "APP_ENV=production"
|
||||||
|
@ -34,6 +35,7 @@ services:
|
||||||
- "QUEUE_HIGH=high"
|
- "QUEUE_HIGH=high"
|
||||||
- "QUEUE_STANDARD=standard"
|
- "QUEUE_STANDARD=standard"
|
||||||
- "QUEUE_LOW=low"
|
- "QUEUE_LOW=low"
|
||||||
|
## Cache settings
|
||||||
- "CACHE_DRIVER=redis"
|
- "CACHE_DRIVER=redis"
|
||||||
- "SESSION_DRIVER=redis"
|
- "SESSION_DRIVER=redis"
|
||||||
- "QUEUE_DRIVER=redis"
|
- "QUEUE_DRIVER=redis"
|
||||||
|
|
Loading…
Reference in New Issue