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
bf07f715
Commit
bf07f715
authored
Jun 28, 2017
by
Cameron Carney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revamped data volume; using docker-compose for variables at runtime.
parent
2691e563
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
66 deletions
+43
-66
Dockerfile
Dockerfile
+2
-3
README.md
README.md
+2
-0
docker-compose.yml
docker-compose.yml
+1
-1
manifest/entrypoint.sh
manifest/entrypoint.sh
+38
-62
No files found.
Dockerfile
View file @
bf07f715
...
...
@@ -3,8 +3,7 @@ FROM alpine:3.6
MAINTAINER
Cameron Carney <ccarney16@live.com>
ENV
CONFIG_FILE=/data/pterodactyl.conf \
STARTUP_TIMEOUT=15 \
STORAGE_DIR=/data/storage \
STARTUP_TIMEOUT=5 \
PANEL_VERSION=v0.6.3
WORKDIR
/var/www/html
...
...
@@ -23,7 +22,7 @@ RUN \
&&
chmod
-R
755 storage/
*
bootstrap/cache
\
&&
curl
-sS
https://getcomposer.org/installer | php
--
--install-dir
=
/usr/local/bin
--filename
=
composer
\
&&
composer
install
--ansi
--no-dev
\
&&
mv
./storage storage.t
emplate
\
&&
mv
./storage storage.t
mpl
\
&&
chown
nginx:nginx
*
-R
COPY
./manifest /
...
...
README.md
View file @
bf07f715
# Pterodactyl Panel Dockerfile #
__A Free and Open Source Agnostic Game Panel__
__Welcome to the Testing Branch, this branch is highly unstable and will change often.__
https://github.com/ccarney16/pterodactyl-panel-dockerfile
### Usage ###
...
...
docker-compose.yml
View file @
bf07f715
...
...
@@ -73,7 +73,7 @@ services:
-
MAIL_DRIVER=mail
-
MAIL_FROM=admin@localhost
-
MAIL_FROM_NAME="Pterodactyl Panel"
image
:
quay.io/ccarney/pterodactyl-panel:
v0.6.3
image
:
quay.io/ccarney/pterodactyl-panel:
testing
ports
:
-
80:80
-
443:443
...
...
manifest/entrypoint.sh
View file @
bf07f715
...
...
@@ -4,45 +4,58 @@
# /entrypoint.sh - Manages the startup of pterodactyl panel
###
set
-e
# Prep Container for usage
function
init
{
# Create the storage directory
if
[
!
-d
${
STORAGE_DIR
}
]
;
then
cp
./storage.template
${
STORAGE_DIR
}
-pr
# Create the storage/cache directory
if
[
!
-d
/data/storage
]
;
then
cp
-pr
storage.tmpl /data/storage
fi
if
[
!
-d
/data/cache
]
;
then
mkdir
-p
/data/cache
chown
-R
nginx:nginx /data/cache
fi
# Remove symlink if it exists
rm
-rf
./storage
ln
-s
${
STORAGE_DIR
}
./storage
# destroy links and recreate them
rm
-rf
storage
ln
-s
/data/storage storage
rm
-rf
bootstrap/cache
ln
-s
/data/cache bootstrap/cache
# 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..."
# Initial setup
if
[
!
-e
"
${
CONFIG_FILE
}
"
]
;
then
echo
"Running first time setup..."
cp
.env.example
"
${
CONFIG_FILE
}
"
cp
-pr
.env.example
${
CONFIG_FILE
}
php artisan optimize
sleep
5
# Clean out everything
php artisan config:cache
php artisan optimize
echo
""
echo
"Generating key..."
sleep
1
php artisan key:generate
--force
updateConfiguration
migrate
dbseed
fi
php artisan optimize
php artisan config:cache
echo
""
echo
"Creating & seeding database..."
sleep
1
php artisan migrate
--force
php artisan db:seed
--force
php artisan config:cache
php artisan optimize
fi
}
# Runs the initial configuration on every startup
function
ini
tServer
{
function
star
tServer
{
if
[[
-z
"
${
APP_URL
}
"
]]
;
then
echo
"Missing environment variable 'APP_URL'! Please resolve it now and start the container back up..."
exit
1
;
...
...
@@ -71,56 +84,19 @@ function initServer {
envsubst
'${DOMAIN_NAME}'
\
< /etc/nginx/templates/http.conf.tmpl
>
/etc/nginx/conf.d/default.conf
fi
}
# Updates a configuration using variables from the .env file and shell variables
function
updateConfiguration
{
php artisan pterodactyl:env
-n
\
--url
=
"
${
APP_URL
}
"
\
--dbhost
=
"
${
DB_HOST
}
"
\
--dbport
=
"
${
DB_PORT
}
"
\
--dbname
=
"
${
DB_DATABASE
}
"
\
--dbuser
=
"
${
DB_USERNAME
}
"
\
--dbpass
=
"
${
DB_PASSWORD
}
"
\
--driver
=
"
${
CACHE_DRIVER
}
"
\
--session-driver
=
"database"
\
--queue-driver
=
"database"
\
--timezone
=
"
${
TIMEZONE
}
"
php artisan pterodactyl:mail
-n
\
--driver
=
"
${
MAIL_DRIVER
}
"
\
--email
=
"
${
MAIL_FROM
}
"
\
--host
=
"
${
MAIL_HOST
}
"
\
--port
=
"
${
MAIL_PORT
}
"
\
--username
=
"
${
MAIL_USERNAME
}
"
\
--password
=
"
${
MAIL_PASSWORD
}
"
\
--from-name
=
"
${
MAIL_FROM_NAME
}
"
}
function
migrate
{
php artisan migrate
--force
}
function
dbseed
{
php artisan db:seed
--force
exec
supervisord
--nodaemon
}
## Start ##
init
case
"
$
1
"
in
case
"
$
{
1
}
"
in
p:start
)
initServer
exec
supervisord
--nodaemon
;;
p:update
)
updateConfiguration
startServer
;;
*
)
echo
-e
"No internal command specified, executing as shell command...
\n
"
exec
$@
exec
${
@
}
;;
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