Skip to content

Commit bbf2337

Browse files
committed
chore: add gzctf
1 parent e37cca0 commit bbf2337

File tree

4 files changed

+113
-0
lines changed

4 files changed

+113
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Multiplayer game servers, browser games and utilities for managing game servers.
447447
- [cs2-dedicated-server](examples/cs2-dedicated-server) - CS2 Dedicated Server Docker Image with an RCON web-based control panel.
448448
- [posio](examples/posio) - A multiplayer geography game using Websockets.
449449
- [Monkeytype](examples/monkeytype) - The most customizable typing website with a minimalistic design and a ton of features. Test yourself in various modes, track your progress and improve your speed.
450+
- [GZCTF](examples/gzctf) - The GZ::CTF project, an open source CTF platform.
450451

451452
### Metrics & Metric Collection
452453

examples/gzctf/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# References
2+
3+
- https://gzctf.gzti.me/guide/start/quick-start.html
4+
- https://github.com/GZTimeWalker/GZCTF
5+
6+
# Notes
7+
8+
You have to pre-supply the `appsettings.json` in the bind mount volume dir.
9+
10+
````
11+
sudo mkdir -p /mnt/docker-volumes/gzctf/config
12+
sudo chmod -R 775 /mnt/docker-volumes/gzctf/config
13+
cp appsettings.json /mnt/docker-volumes/gzctf/config/.
14+
````

examples/gzctf/appsettings.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"AllowedHosts": "*",
3+
"ConnectionStrings": {
4+
"Database": "Host=db:5432;Database=gzctf;Username=postgres;Password=secure-gzctf-db-password",
5+
"RedisCache": "cache:6379,abortConnect=false"
6+
},
7+
"EmailConfig": {
8+
"SenderAddress": "",
9+
"SenderName": "",
10+
"UserName": "",
11+
"Password": "",
12+
"Smtp": {
13+
"Host": "localhost",
14+
"Port": 587
15+
}
16+
},
17+
"XorKey": "<YOUR-RANDOM-XOR-KEY>",
18+
"ContainerProvider": {
19+
"Type": "Docker", // or "Kubernetes"
20+
"PortMappingType": "Default", // or "PlatformProxy"
21+
"EnableTrafficCapture": false,
22+
"PublicEntry": "ctf.example.com", // or "xxx.xxx.xxx.xxx"
23+
// optional
24+
"DockerConfig": {
25+
"SwarmMode": false,
26+
"Uri": "unix:///var/run/docker.sock"
27+
}
28+
},
29+
"CaptchaConfig": {
30+
"Provider": "None", // or "CloudflareTurnstile" or "HashPow"
31+
"SiteKey": "<Your SITE_KEY>",
32+
"SecretKey": "<Your SECRET_KEY>"
33+
},
34+
"ForwardedOptions": {
35+
"ForwardedHeaders": 7,
36+
"ForwardLimit": 1,
37+
"TrustedNetworks": ["192.168.12.0/8"]
38+
}
39+
}
40+

examples/gzctf/docker-compose.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
services:
2+
3+
gzctf:
4+
image: gztime/gzctf:latest
5+
container_name: gzctf-app
6+
restart: always
7+
environment:
8+
- GZCTF_ADMIN_PASSWORD=My-Secure-Password5
9+
- LC_ALL=de-DE.UTF-8
10+
expose:
11+
- 8080
12+
ports:
13+
- "8888:8080"
14+
volumes:
15+
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/data/files:/app/files
16+
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/config/appsettings.json:/app/appsettings.json:ro
17+
- /var/run/docker.sock:/var/run/docker.sock
18+
depends_on:
19+
- db
20+
#networks:
21+
# - internal
22+
# - proxy
23+
#labels:
24+
# - traefik.enable=true
25+
# - traefik.docker.network=proxy
26+
# - traefik.http.routers.ctf.rule=Host(`ctf.example.com`)
27+
# - traefik.http.services.ctf.loadbalancer.server.port=8080
28+
# # Optional part for traefik middlewares
29+
# - traefik.http.routers.ctf.middlewares=authentik@docker
30+
31+
db:
32+
image: docker.io/library/postgres:16-alpine
33+
container_name: gzctf-db
34+
restart: always
35+
environment:
36+
- POSTGRES_USER=postgres
37+
- POSTGRES_PASSWORD=secure-gzctf-db-password
38+
- POSTGRES_DB=gzctf
39+
volumes:
40+
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/data/db:/var/lib/postgresql/data
41+
#networks:
42+
# - internal
43+
44+
cache:
45+
image: ghcr.io/microsoft/garnet-alpine:latest
46+
container_name: gzctf-cache
47+
expose:
48+
- 6379
49+
command: ["--bind", "0.0.0.0"]
50+
restart: always
51+
#networks:
52+
# - internal
53+
54+
#networks:
55+
# internal:
56+
# internal: true
57+
# proxy:
58+
# external: true

0 commit comments

Comments
 (0)