Commit 04a248c6 authored by Cameron Carney's avatar Cameron Carney

Changed PANEL_URL to APP_URL; Fixed CentOS missing Files

parent f9b47b86
......@@ -17,9 +17,9 @@ RUN \
&& apk add curl gettext nginx php7 php7 php7-bcmath php7-common php7-dom php7-fpm php7-gd \
php7-memcached php7-mbstring php7-openssl php7-pdo php7-phar php7-json php7-pdo_mysql \
php7-session php7-tokenizer php7-ctype php7-zlib php7-zip supervisor \
&& mkdir -p /var/www/html /run/nginx
RUN curl -Lo "${PANEL_VERSION}.tar.gz" https://github.com/Pterodactyl/Panel/archive/${PANEL_VERSION}.tar.gz \
&& mkdir -p /var/www/html /run/nginx \
\
&& curl -Lo "${PANEL_VERSION}.tar.gz" https://github.com/Pterodactyl/Panel/archive/${PANEL_VERSION}.tar.gz \
&& tar --strip-components=1 -xzvf ${PANEL_VERSION}.tar.gz \
&& rm "${PANEL_VERSION}.tar.gz" \
&& chmod -R 755 storage/* bootstrap/cache \
......
......@@ -27,7 +27,7 @@ __*Security Options*__
#### Panel Variables ####
---
* *PANEL_URL*: URL you want to use for the panel [required on startup].
* *APP_URL*: URL you want to use for the panel [required on startup].
* *TIMEZONE*:
......
......@@ -45,7 +45,7 @@ services:
- cache
- mysql
environment:
- PANEL_URL=http://localhost/
- APP_URL=http://localhost/
# SSL Encryption, useful if you dont run behind a reverse proxy
- SSL=false
......
......@@ -39,16 +39,21 @@ function init {
# Runs the initial configuration on every startup
function initServer {
if [[ -z "${PANEL_URL}" ]]; then
echo "Missing environment variable 'PANEL_URL'! Please resolve it now and start the container back up..."
if [[ -z "${APP_URL}" ]]; then
echo "Missing environment variable 'APP_URL'! Please resolve it now and start the container back up..."
exit 1;
fi
if [[ "${STARTUP_TIMEOUT}" -gt "0" ]]; then
echo "Starting Pterodactyl ${PANEL_VERSION} in ${STARTUP_TIMEOUT} seconds..."
sleep ${STARTUP_TIMEOUT}
else
echo "Starting Pterodactyl ${PANEL_VERSION}..."
fi
# Since Nginx does not support URL's, lets just pull the domain out of the URL
export DOMAIN_NAME="$(echo $PANEL_URL | awk -F/ '{print $3}')"
export DOMAIN_NAME="$(echo $APP_URL | awk -F/ '{print $3}')"
# Checks if we have SSL enabled or not, and updates the configuration to what is desired.
if [ "${SSL}" == "true" ]; then
......@@ -68,7 +73,7 @@ function initServer {
function updateConfiguration {
php artisan pterodactyl:env -n \
--url="${PANEL_URL}" \
--url="${APP_URL}" \
--dbhost="${DB_HOST}" \
--dbport="${DB_PORT}" \
--dbname="${DB_DATABASE}" \
......
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