Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
docker-pterodactyl-legacy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
docker-pterodactyl-legacy
Commits
04a248c6
Commit
04a248c6
authored
May 11, 2017
by
Cameron Carney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed PANEL_URL to APP_URL; Fixed CentOS missing Files
parent
f9b47b86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
19 deletions
+24
-19
Dockerfile
Dockerfile
+3
-3
ENVIRONMENT.md
ENVIRONMENT.md
+1
-1
docker-compose.yml
docker-compose.yml
+2
-2
manifest/entrypoint.sh
manifest/entrypoint.sh
+18
-13
No files found.
Dockerfile
View file @
04a248c6
...
...
@@ -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 \
...
...
ENVIRONMENT.md
View file @
04a248c6
...
...
@@ -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*
:
...
...
docker-compose.yml
View file @
04a248c6
...
...
@@ -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
...
...
@@ -100,4 +100,4 @@ services:
#
# - /tmp/pterodactyl:/tmp/pterodactyl
#
# - /var/run/docker.sock:/var/run/docker.sock
\ No newline at end of file
# - /var/run/docker.sock:/var/run/docker.sock
manifest/entrypoint.sh
View file @
04a248c6
...
...
@@ -15,20 +15,20 @@ function init {
rm
-rf
./storage
ln
-s
${
STORAGE_DIR
}
./storage
# Always destroy .env symlink on startup
rm
.env
-rf
ln
-s
"
${
CONFIG_FILE
}
"
.env
if
[
!
-e
"
${
CONFIG_FILE
}
"
]
||
[
!
-s
"
${
CONFIG_FILE
}
"
]
;
then
echo
"Missing Configuration file, Creating..."
cp
.env.example
"
${
CONFIG_FILE
}
"
php artisan optimize
php artisan config:cache
php artisan key:generate
--force
updateConfiguration
fi
...
...
@@ -39,26 +39,31 @@ 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
echo
"Starting Pterodactyl
${
PANEL_VERSION
}
in
${
STARTUP_TIMEOUT
}
seconds..."
sleep
${
STARTUP_TIMEOUT
}
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
echo
"Enabling SSL"
envsubst
'${DOMAIN_NAME},${SSL_CERT},${SSL_CERT_KEY}'
\
< /etc/nginx/templates/https.conf.tmpl
>
/etc/nginx/conf.d/default.conf
else
echo
"Disabling SSL"
envsubst
'${DOMAIN_NAME}'
\
< /etc/nginx/templates/http.conf.tmpl
>
/etc/nginx/conf.d/default.conf
fi
...
...
@@ -66,9 +71,9 @@ function initServer {
# Updates a configuration using variables from the .env file and shell variables
function
updateConfiguration
{
php artisan pterodactyl:env
-n
\
--url
=
"
${
PANEL
_URL
}
"
\
--url
=
"
${
APP
_URL
}
"
\
--dbhost
=
"
${
DB_HOST
}
"
\
--dbport
=
"
${
DB_PORT
}
"
\
--dbname
=
"
${
DB_DATABASE
}
"
\
...
...
@@ -109,4 +114,4 @@ case "$1" in
echo
-e
"No internal command specified, executing as shell command...
\n
"
exec
$@
;;
esac
\ No newline at end of file
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment