Last active
July 27, 2020 12:04
-
-
Save thebongy/b3c6fe3b9a2b6fd8c4190d1ba50453d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
ctfd: | |
build: . | |
user: root | |
restart: always | |
ports: | |
- "8000:8000" | |
environment: | |
- SECRET_KEY=(put a random secret_key here) | |
- OAUTH_PROVIDER=ctftime | |
- OAUTH_CALLBACK_ENDPOINT=https://ctf.csivit.com/redirect (Replace this with your CTFtime redirect URL) | |
- OAUTH_CLIENT_ID=1081 (Replace this with your CTFTime Client_id) | |
- OAUTH_CLIENT_SECRET=(Replace this with your CTFTime Client_secret) | |
- UPLOAD_FOLDER=/var/uploads | |
- DATABASE_URL=mysql+pymysql://root:ctfd@db/ctfd | |
- REDIS_URL=redis://cache:6379 | |
- WORKERS=10 | |
- LOG_FOLDER=/var/log/CTFd | |
- ACCESS_LOG=- | |
- ERROR_LOG=- | |
volumes: | |
- .data/CTFd/logs:/var/log/CTFd | |
- .data/CTFd/uploads:/var/uploads | |
- .:/opt/CTFd:ro | |
depends_on: | |
- db | |
networks: | |
default: | |
internal: | |
db: | |
image: mariadb:10.4.12 | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=ctfd | |
- MYSQL_USER=ctfd | |
- MYSQL_PASSWORD=ctfd | |
- MYSQL_DATABASE=ctfd | |
volumes: | |
- .data/mysql:/var/lib/mysql | |
networks: | |
internal: | |
# This command is required to set important mariadb defaults | |
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0] | |
cache: | |
image: redis:4 | |
restart: always | |
volumes: | |
- .data/redis:/data | |
networks: | |
internal: | |
networks: | |
default: | |
internal: | |
internal: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment