2017-01-06 22:04:57 +00:00
|
|
|
version: '2'
|
2016-01-09 00:42:23 +00:00
|
|
|
|
2017-01-06 22:04:57 +00:00
|
|
|
services:
|
|
|
|
ctfd:
|
|
|
|
build: .
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
|
|
|
environment:
|
2018-02-11 08:52:21 +00:00
|
|
|
- UPLOAD_FOLDER=/var/uploads
|
|
|
|
- LOG_FOLDER=/var/log/CTFd
|
2017-07-16 06:50:32 +00:00
|
|
|
- DATABASE_URL=mysql+pymysql://root:ctfd@db/ctfd
|
2018-03-25 08:25:33 +00:00
|
|
|
- REDIS_URL=redis://cache:6379
|
|
|
|
- WORKERS=4
|
2017-01-06 22:04:57 +00:00
|
|
|
volumes:
|
2018-02-11 08:52:21 +00:00
|
|
|
- .data/CTFd/logs:/var/log/CTFd
|
|
|
|
- .data/CTFd/uploads:/var/uploads
|
|
|
|
- .:/opt/CTFd:ro
|
2017-04-08 21:35:18 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2018-02-11 08:52:21 +00:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
internal:
|
2017-01-06 22:04:57 +00:00
|
|
|
|
|
|
|
db:
|
2017-07-16 06:50:32 +00:00
|
|
|
image: mariadb:10.2
|
2018-02-11 08:52:21 +00:00
|
|
|
restart: always
|
2017-01-06 22:04:57 +00:00
|
|
|
environment:
|
2017-06-03 20:28:02 +00:00
|
|
|
- MYSQL_ROOT_PASSWORD=ctfd
|
|
|
|
- MYSQL_USER=ctfd
|
|
|
|
- MYSQL_PASSWORD=ctfd
|
2017-01-06 22:04:57 +00:00
|
|
|
volumes:
|
|
|
|
- .data/mysql:/var/lib/mysql
|
2018-02-11 08:52:21 +00:00
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
# This command is required to set important mariadb defaults
|
2018-03-25 08:25:33 +00:00
|
|
|
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:
|
2018-02-11 08:52:21 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
internal:
|
|
|
|
internal: true
|