Fixing some docker issues

Closes #266
This commit is contained in:
Kevin Chung
2017-06-03 16:28:02 -04:00
parent 6d9d03e35e
commit 736a0e1dc3
2 changed files with 7 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ services:
ports:
- "8000:8000"
environment:
- DATABASE_URL=mysql+pymysql://root@db/ctfd
- DATABASE_URL=mysql+pymysql://ctfd:ctfd@db/ctfd
volumes:
- .data/CTFd/logs:/opt/CTFd/CTFd/logs
- .data/CTFd/uploads:/opt/CTFd/CTFd/uploads
@@ -15,8 +15,11 @@ services:
- db
db:
image: mysql
image: mariadb
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_ROOT_PASSWORD=ctfd
- MYSQL_USER=ctfd
- MYSQL_PASSWORD=ctfd
- MYSQL_DATABASE=ctfd
volumes:
- .data/mysql:/var/lib/mysql

View File

@@ -12,4 +12,4 @@ echo "Ready"
sleep 1;
echo "Starting CTFd"
gunicorn --bind 0.0.0.0:8000 -w 4 'CTFd:create_app()' --access-logfile '/opt/CTFd/CTFd/logs/access.log' --error-logfile '/opt/CTFd/CTFd/logs/error.log'
gunicorn --bind 0.0.0.0:8000 -w 1 --threads 8 'CTFd:create_app()' --access-logfile '/opt/CTFd/CTFd/logs/access.log' --error-logfile '/opt/CTFd/CTFd/logs/error.log'