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
95728151
Commit
95728151
authored
Apr 14, 2018
by
Cameron Carney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support to disable cron/workers; readded in SSL.
parent
e2da4db5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
134 additions
and
8 deletions
+134
-8
.env.example
.env.example
+1
-1
manifest/entrypoint.sh
manifest/entrypoint.sh
+31
-5
manifest/etc/nginx/nginx.conf
manifest/etc/nginx/nginx.conf
+39
-0
manifest/etc/nginx/templates/http.conf
manifest/etc/nginx/templates/http.conf
+0
-0
manifest/etc/nginx/templates/https.conf
manifest/etc/nginx/templates/https.conf
+59
-0
manifest/etc/supervisor.d/runtime-files/crond.ini
manifest/etc/supervisor.d/runtime-files/crond.ini
+0
-0
manifest/etc/supervisor.d/runtime-files/nginx.ini
manifest/etc/supervisor.d/runtime-files/nginx.ini
+0
-0
manifest/etc/supervisor.d/runtime-files/php-fpm.ini
manifest/etc/supervisor.d/runtime-files/php-fpm.ini
+0
-0
manifest/etc/supervisor.d/runtime-files/pterodactyl-workers.ini
...st/etc/supervisor.d/runtime-files/pterodactyl-workers.ini
+0
-0
manifest/etc/supervisor.d/runtime.ini
manifest/etc/supervisor.d/runtime.ini
+0
-2
manifest/etc/supervisord.conf
manifest/etc/supervisord.conf
+4
-0
No files found.
.env.example
View file @
95728151
...
...
@@ -19,7 +19,7 @@ SSL_CERT="/etc/certs/cert.pem"
SSL_CERT_KEY="/etc/certs/cert.key"
# Disable's runtime workers & cronjob (this is useful if you want to run these in another container)
DISABLE_WORKER=false
DISABLE_WORKER
S
=false
##
# Panel Variables
...
...
manifest/entrypoint.sh
View file @
95728151
...
...
@@ -15,10 +15,18 @@ function init {
chown
-R
nginx:nginx /data/storage
fi
if
[
!
-d
/data/cache
]
;
then
mkdir
-p
/data/cache
chown
-R
nginx:nginx /data/cache
fi
# destroy links (or files) and recreate them
rm
-rf
storage
ln
-s
/data/storage storage
rm
-rf
bootstrap/cache
ln
-s
/data/cache bootstrap/cache
rm
-rf
.env
ln
-s
/data/pterodactyl.conf .env
}
...
...
@@ -27,7 +35,7 @@ function init {
function
startServer
{
# Initial setup
if
[
!
-e
"/data/pterodactyl.conf"
]
;
then
if
[
!
-e
/data/pterodactyl.conf
]
;
then
echo
"Running first time setup..."
# Generate base template
...
...
@@ -56,10 +64,6 @@ function startServer {
php artisan db:seed
--force
fi
rm
-rf
/var/run/supervisor.d/
mkdir
/var/run/supervisor.d/
cp
/etc/supervisor.d/service-files/
*
/var/run/supervisor.d/
# Allows Users to give MySQL/cache sometime to start up.
if
[[
"
${
STARTUP_TIMEOUT
}
"
-gt
"0"
]]
;
then
echo
"Starting Pterodactyl
${
PANEL_VERSION
}
in
${
STARTUP_TIMEOUT
}
seconds..."
...
...
@@ -68,6 +72,28 @@ function startServer {
echo
"Starting Pterodactyl
${
PANEL_VERSION
}
..."
fi
if
[
"
${
SSL
}
"
==
"true"
]
;
then
envsubst
'${SSL_CERT},${SSL_CERT_KEY}'
\
< /etc/nginx/templates/https.conf
>
/etc/nginx/conf.d/default.conf
else
echo
"[Warning] Disabling HTTPS"
cat
/etc/nginx/templates/http.conf
>
/etc/nginx/conf.d/default.conf
fi
# Copy service files to runtime files
rm
-rf
/var/run/supervisor.d/
mkdir
/var/run/supervisor.d/
# Determine if workers should be enabled or not
if
[
"
${
DISABLE_WORKERS
}
"
!=
"true"
]
;
then
cp
/etc/supervisor.d/runtime-files/
*
/var/run/supervisor.d/
else
echo
"[Warning] Disabling Workers (pteroq & cron); It is recommended to keep these enabled unless you know what you are doing."
cp
/etc/supervisor.d/runtime-files/nginx.ini
\
/etc/supervisor.d/runtime-files/php-fpm.ini
\
/var/run/supervisor.d/
fi
exec
supervisord
--nodaemon
}
...
...
manifest/etc/nginx/nginx.conf
0 → 100644
View file @
95728151
user
nginx
;
worker_processes
auto
;
error_log
/var/log/nginx/error.log
;
pid
/var/run/nginx.pid
;
events
{
worker_connections
1024
;
multi_accept
on
;
use
epoll
;
}
http
{
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
charset
utf-8
;
# Hide nginx version.
server_tokens
off
;
sendfile
on
;
tcp_nopush
on
;
tcp_nodelay
on
;
aio
on
;
directio
512
;
keepalive_timeout
65
;
types_hash_max_size
2048
;
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
# General config directory
include
/etc/nginx/conf.d/*.conf
;
}
\ No newline at end of file
manifest/etc/nginx/
conf.d/default
.conf
→
manifest/etc/nginx/
templates/http
.conf
View file @
95728151
File moved
manifest/etc/nginx/templates/https.conf
0 → 100644
View file @
95728151
server
{
listen
80
default
;
listen
[::]:
80
default
;
location
^~ /.
well
-
known
{
alias
/
var
/
www
/
html
/
public
/.
well
-
known
;
}
location
/ {
return
301
https
://$
host
$
request_uri
;
}
}
server
{
listen
443
ssl
http2
default
;
listen
[::]:
443
ssl
http2
default
;
root
/
var
/
www
/
html
/
public
;
index
index
.
php
;
charset
utf
-
8
;
ssl_certificate
${
SSL_CERT
};
ssl_certificate_key
${
SSL_CERT_KEY
};
location
/ {
try_files
$
uri
$
uri
/ /
index
.
php
?$
query_string
;
}
location
= /
favicon
.
ico
{
access_log
off
;
log_not_found
off
; }
location
= /
robots
.
txt
{
access_log
off
;
log_not_found
off
; }
access_log
off
;
error_log
/
data
/
storage
/
logs
/
nginx
.
app
-
error
.
log
error
;
# allow larger file uploads and longer script runtimes
client_max_body_size
100
m
;
client_body_timeout
120
s
;
sendfile
off
;
location
~ \.
php
$ {
fastcgi_split_path_info
^(.+\.
php
)(/.+)$;
fastcgi_pass
unix
:/
var
/
run
/
php
-
fpm
.
sock
;
fastcgi_index
index
.
php
;
include
fastcgi_params
;
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
fastcgi_script_name
;
fastcgi_param
PHP_VALUE
"upload_max_filesize = 100M \n post_max_size=100M"
;
fastcgi_intercept_errors
off
;
fastcgi_buffer_size
16
k
;
fastcgi_buffers
4
16
k
;
fastcgi_connect_timeout
300
;
fastcgi_send_timeout
300
;
fastcgi_read_timeout
300
;
}
location
~ /\.
ht
{
deny
all
;
}
}
\ No newline at end of file
manifest/etc/supervisor.d/
servic
e-files/crond.ini
→
manifest/etc/supervisor.d/
runtim
e-files/crond.ini
View file @
95728151
File moved
manifest/etc/supervisor.d/
servic
e-files/nginx.ini
→
manifest/etc/supervisor.d/
runtim
e-files/nginx.ini
View file @
95728151
File moved
manifest/etc/supervisor.d/
servic
e-files/php-fpm.ini
→
manifest/etc/supervisor.d/
runtim
e-files/php-fpm.ini
View file @
95728151
File moved
manifest/etc/supervisor.d/
servic
e-files/pterodactyl-workers.ini
→
manifest/etc/supervisor.d/
runtim
e-files/pterodactyl-workers.ini
View file @
95728151
File moved
manifest/etc/supervisor.d/runtime.ini
deleted
100644 → 0
View file @
e2da4db5
[include]
files
=
/var/run/supervisor.d/*.ini
\ No newline at end of file
manifest/etc/supervisord.conf
0 → 100644
View file @
95728151
[
supervisord
]
[
include
]
files
= /
var
/
run
/
supervisor
.
d
/*.
ini
\ No newline at end of file
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