Commit 9d42e4f2 authored by Cameron Carney's avatar Cameron Carney

added new commands into entrypoint

parent 45253bdc
...@@ -45,6 +45,7 @@ services: ...@@ -45,6 +45,7 @@ services:
- cache - cache
- mysql - mysql
environment: environment:
# Please change this to something else or routing will not work correctly.
- APP_URL=http://localhost/ - APP_URL=http://localhost/
# SSL Encryption, useful if you dont run behind a reverse proxy # SSL Encryption, useful if you dont run behind a reverse proxy
...@@ -83,21 +84,21 @@ services: ...@@ -83,21 +84,21 @@ services:
# - ./certs:/certs # - ./certs:/certs
## ##
# If you plan on running the daemon on the same machine, uncomment the section below. # If you don't plan on running the daemon on the same machine, comment the section below.
## ##
# daemon: daemon:
# image: quay.io/ccarney/pterodactyl-daemon:v0.4.2 image: quay.io/ccarney/pterodactyl-daemon:v0.4.2
# depends_on: depends_on:
# - panel - panel
# ports: ports:
# - 8080:8080 - 8080:8080
# restart: always restart: always
# volumes: volumes:
# - /srv/daemon/config:/srv/daemon/config - /srv/daemon/config:/srv/daemon/config
# - /srv/daemon/packs:/srv/daemon/packs - /srv/daemon/packs:/srv/daemon/packs
# - /srv/daemon/scripts:/srv/daemon/scripts - /srv/daemon/scripts:/srv/daemon/scripts
# - /srv/daemon-data:/srv/daemon-data - /srv/daemon-data:/srv/daemon-data
#
# - /tmp/pterodactyl:/tmp/pterodactyl - /tmp/pterodactyl:/tmp/pterodactyl
#
# - /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
...@@ -13,6 +13,7 @@ function init { ...@@ -13,6 +13,7 @@ function init {
cp ./storage.template ${STORAGE_DIR} -pr cp ./storage.template ${STORAGE_DIR} -pr
fi fi
# Remove symlink if it exists
rm -rf ./storage rm -rf ./storage
ln -s ${STORAGE_DIR} ./storage ln -s ${STORAGE_DIR} ./storage
...@@ -27,9 +28,12 @@ function init { ...@@ -27,9 +28,12 @@ function init {
php artisan optimize php artisan optimize
php artisan config:cache php artisan config:cache
php artisan key:generate --force
php artisan key:generate --force
updateConfiguration updateConfiguration
migrate
dbseed
fi fi
php artisan optimize php artisan optimize
...@@ -93,8 +97,13 @@ function updateConfiguration { ...@@ -93,8 +97,13 @@ function updateConfiguration {
--password="${MAIL_PASSWORD}" \ --password="${MAIL_PASSWORD}" \
--from-name="${MAIL_FROM_NAME}" --from-name="${MAIL_FROM_NAME}"
}
function migrate {
php artisan migrate --force php artisan migrate --force
}
function dbseed {
php artisan db:seed --force php artisan db:seed --force
} }
...@@ -103,10 +112,16 @@ function updateConfiguration { ...@@ -103,10 +112,16 @@ function updateConfiguration {
init init
case "$1" in case "$1" in
p:down)
php artisan down
;;
p:start) p:start)
initServer initServer
exec supervisord --nodaemon exec supervisord --nodaemon
;; ;;
p:up)
php artisan up
;;
p:update) p:update)
updateConfiguration updateConfiguration
;; ;;
......
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