mirror of https://github.com/JohnHammond/CTFd.git
Adding .dockerignore and making docker-entrypoint consider DATABASE_URL (#312)
parent
92f130d5de
commit
2e5c8a1adb
|
@ -0,0 +1,7 @@
|
|||
CTFd/logs/*.log
|
||||
CTFd/static/uploads
|
||||
CTFd/uploads
|
||||
CTFd/*.db
|
||||
CTFd/uploads/**/*
|
||||
.ctfd_secret_key
|
||||
.data
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# http://stackoverflow.com/questions/25503412/how-do-i-know-when-my-docker-mysql-container-is-up-and-mysql-is-ready-for-taking#29793382
|
||||
if [ -n "$DATABASE_URL" ]
|
||||
then
|
||||
# https://stackoverflow.com/a/29793382
|
||||
echo "Waiting on MySQL"
|
||||
while ! mysqladmin ping -h db --silent; do
|
||||
# Show some progress
|
||||
|
@ -10,6 +12,7 @@ done
|
|||
echo "Ready"
|
||||
# Give it another second.
|
||||
sleep 1;
|
||||
fi
|
||||
|
||||
echo "Starting CTFd"
|
||||
gunicorn --bind 0.0.0.0:8000 -w 1 'CTFd:create_app()' --access-logfile '/opt/CTFd/CTFd/logs/access.log' --error-logfile '/opt/CTFd/CTFd/logs/error.log'
|
||||
|
|
Loading…
Reference in New Issue