require docker
,docker-compose
- create docker-swarm
docker swarm init
- label node
docker node ls
docker node update --label-add name=linux-1 <节点 ID>
- pull the codes
git clone https://github.com/EkiXu/CTFm
cd CTFm
git submodule update --init --recursive
mkdir backend/log/
- create secret for passwords
echo -n "<your secret here>" > "./secrets/DB_PASSWORD"
echo -n "<your secret here>" > "./secrets/REDIS_PASSWORD"
echo -n "<your secret here>" > "./secrets/SECRET_KEY"
- regenerate frontend code
cd frontend
yarn install
yarn build
- regenerate dashboard code
cd dashboard
yarn install
yarn build
- start the project by docker-compose
docker-compose up -d --build
- initialize the database and super admin
docker-compose exec ctfm /bin/bash
python manage.py migrate
python manage.py createsuperuser
your can modify some preferences by creating backend/CTFm_backend/local_settings.py
Get the api key from https://www.google.com/recaptcha/
put your client key atfrontend/.env下
VUE_APP_BASE_API = '/api/v1'
VUE_APP_RECAPTCHA_PUBLIC_KEY = '<your RECAPTCHA_CLIENT_KEY>'
and rebuild your frontend dist
yarn build
put the line below in your local_settings.py
#backend/CTFm_backend/local_settings.py
DRF_RECAPTCHA_SECRET_KEY = "<your RECAPTCHA_SERVER_KEY>"
CTFm now is using TencentClound SDK for Email Verification codes at [backend/user/utils.py]
Inspired by CTFd-Whale
Example Config:
#backend/CTFm_backend/local_settings.py
ENABLE_EMAIL_VALIDATION = True
TENCENT_SECRET_ID = ""
TENCENT_SECRET_KEY = ""
EMAIL = "contest@noreply.mrctf.fun"
REGISTER_VALIDATION_EMAIL_TEMPLATE = 13280
RESET_PASSWORD_EMAIL_TEMPLATE = 13281
- Basic Challenge Manage
- Basic User Profile
- Scoreboard & TrendChart
- ChangePassword
- Notification Manage
- Realtime Notification
- Dynamic Challenge Score Support
- Boardcast TOP3 Socrer via Websocket
- Dynamic Docker Challenge Support
- Team Support
- Plugin System
All kinds of contributions are welcomed.