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
|
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
|
2019-04-17 05:36:30 +00:00
|
|
|
- WORKERS=4
|
2019-01-21 17:17:59 +00:00
|
|
|
- LOG_FOLDER=/var/log/CTFd
|
|
|
|
- ACCESS_LOG=-
|
|
|
|
- ERROR_LOG=-
|
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:
|
2018-11-28 05:57:54 +00:00
|
|
|
image: mariadb:10.4
|
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
|