Update and repair image

This commit is contained in:
2024-01-15 19:22:15 -06:00
parent 38dfee7fa3
commit 2e2c253f65
6 changed files with 18 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/with-contenv bash
#!/command/with-contenv bash
source ContainerTools
SNAME=${BASH_SOURCE##*/}
WORKDIR="/var/www/pterodactyl"
# If DBHOST value is present, pause boot until target container is up.
if [ -n "$DBHOST" ]; then
@@ -27,7 +28,7 @@ fi
# Check for persistent storage directory, create file structure if not present.
if [ ! -d "/config/storage" ]; then
log "Creating storage directory"
cat .storage.tmpl | while read line; do
cat $WORKDIR/.storage.tmpl | while read line; do
mkdir -p "/config/${line}"
done
fi
@@ -42,17 +43,17 @@ fi
if [ ! -e /config/pterodactyl.conf ]; then
log "Config file does not exist, creating template"
log "[WARN] Connect to container and finish setup process"
cp .env.example /config/pterodactyl.conf
cp $WORKDIR/.env.example /config/pterodactyl.conf
log "Generating unique Pterodactyl key"
log "$(php artisan key:generate --force --no-interaction)"
log "$(php $WORKDIR/artisan key:generate --force --no-interaction)"
fi
# Clear views and autogenerated configs on launch. This is necessary for updates, and doesn't affect non-update launches.
log "$(php artisan view:clear)"
log "$(php artisan config:clear)"
log "$(php $WORKDIR/artisan view:clear)"
log "$(php $WORKDIR/artisan config:clear)"
log "Checking for database updates, preparing cache"
log "[NOTE] This will fail if the database connection has not yet been configured"
log "$(php artisan migrate --seed --force)"
log "$(php $WORKDIR/artisan migrate --seed --force)"
chown -R nginx:nginx /config/
# Load selected Nginx conf.

View File

@@ -1,2 +1,2 @@
#!/usr/bin/execlineb -P
#!/command/execlineb -P
/usr/sbin/crond -fL /dev/null

View File

@@ -1,2 +1,2 @@
#!/usr/bin/execlineb -P
#!/command/execlineb -P
/usr/sbin/nginx -g "daemon off;"

View File

@@ -1,2 +1,2 @@
#!/usr/bin/execlineb -P
#!/command/execlineb -P
/usr/sbin/php-fpm -Fc /etc/php

View File

@@ -1,3 +1,3 @@
#!/usr/bin/execlineb -P
#!/command/execlineb -P
s6-setuidgid nginx
/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3