kopia lustrzana https://github.com/Haxxnet/Compose-Examples
chore: add gzctf
rodzic
e37cca0f16
commit
bbf2337375
|
@ -447,6 +447,7 @@ Multiplayer game servers, browser games and utilities for managing game servers.
|
||||||
- [cs2-dedicated-server](examples/cs2-dedicated-server) - CS2 Dedicated Server Docker Image with an RCON web-based control panel.
|
- [cs2-dedicated-server](examples/cs2-dedicated-server) - CS2 Dedicated Server Docker Image with an RCON web-based control panel.
|
||||||
- [posio](examples/posio) - A multiplayer geography game using Websockets.
|
- [posio](examples/posio) - A multiplayer geography game using Websockets.
|
||||||
- [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.
|
- [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.
|
||||||
|
- [GZCTF](examples/gzctf) - The GZ::CTF project, an open source CTF platform.
|
||||||
|
|
||||||
### Metrics & Metric Collection
|
### Metrics & Metric Collection
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
# References
|
||||||
|
|
||||||
|
- https://gzctf.gzti.me/guide/start/quick-start.html
|
||||||
|
- https://github.com/GZTimeWalker/GZCTF
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
|
||||||
|
You have to pre-supply the `appsettings.json` in the bind mount volume dir.
|
||||||
|
|
||||||
|
````
|
||||||
|
sudo mkdir -p /mnt/docker-volumes/gzctf/config
|
||||||
|
sudo chmod -R 775 /mnt/docker-volumes/gzctf/config
|
||||||
|
cp appsettings.json /mnt/docker-volumes/gzctf/config/.
|
||||||
|
````
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"Database": "Host=db:5432;Database=gzctf;Username=postgres;Password=secure-gzctf-db-password",
|
||||||
|
"RedisCache": "cache:6379,abortConnect=false"
|
||||||
|
},
|
||||||
|
"EmailConfig": {
|
||||||
|
"SenderAddress": "",
|
||||||
|
"SenderName": "",
|
||||||
|
"UserName": "",
|
||||||
|
"Password": "",
|
||||||
|
"Smtp": {
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 587
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"XorKey": "<YOUR-RANDOM-XOR-KEY>",
|
||||||
|
"ContainerProvider": {
|
||||||
|
"Type": "Docker", // or "Kubernetes"
|
||||||
|
"PortMappingType": "Default", // or "PlatformProxy"
|
||||||
|
"EnableTrafficCapture": false,
|
||||||
|
"PublicEntry": "ctf.example.com", // or "xxx.xxx.xxx.xxx"
|
||||||
|
// optional
|
||||||
|
"DockerConfig": {
|
||||||
|
"SwarmMode": false,
|
||||||
|
"Uri": "unix:///var/run/docker.sock"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CaptchaConfig": {
|
||||||
|
"Provider": "None", // or "CloudflareTurnstile" or "HashPow"
|
||||||
|
"SiteKey": "<Your SITE_KEY>",
|
||||||
|
"SecretKey": "<Your SECRET_KEY>"
|
||||||
|
},
|
||||||
|
"ForwardedOptions": {
|
||||||
|
"ForwardedHeaders": 7,
|
||||||
|
"ForwardLimit": 1,
|
||||||
|
"TrustedNetworks": ["192.168.12.0/8"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
services:
|
||||||
|
|
||||||
|
gzctf:
|
||||||
|
image: gztime/gzctf:latest
|
||||||
|
container_name: gzctf-app
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- GZCTF_ADMIN_PASSWORD=My-Secure-Password5
|
||||||
|
- LC_ALL=de-DE.UTF-8
|
||||||
|
expose:
|
||||||
|
- 8080
|
||||||
|
ports:
|
||||||
|
- "8888:8080"
|
||||||
|
volumes:
|
||||||
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/data/files:/app/files
|
||||||
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/config/appsettings.json:/app/appsettings.json:ro
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
#networks:
|
||||||
|
# - internal
|
||||||
|
# - proxy
|
||||||
|
#labels:
|
||||||
|
# - traefik.enable=true
|
||||||
|
# - traefik.docker.network=proxy
|
||||||
|
# - traefik.http.routers.ctf.rule=Host(`ctf.example.com`)
|
||||||
|
# - traefik.http.services.ctf.loadbalancer.server.port=8080
|
||||||
|
# # Optional part for traefik middlewares
|
||||||
|
# - traefik.http.routers.ctf.middlewares=authentik@docker
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: docker.io/library/postgres:16-alpine
|
||||||
|
container_name: gzctf-db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=secure-gzctf-db-password
|
||||||
|
- POSTGRES_DB=gzctf
|
||||||
|
volumes:
|
||||||
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/gzctf/data/db:/var/lib/postgresql/data
|
||||||
|
#networks:
|
||||||
|
# - internal
|
||||||
|
|
||||||
|
cache:
|
||||||
|
image: ghcr.io/microsoft/garnet-alpine:latest
|
||||||
|
container_name: gzctf-cache
|
||||||
|
expose:
|
||||||
|
- 6379
|
||||||
|
command: ["--bind", "0.0.0.0"]
|
||||||
|
restart: always
|
||||||
|
#networks:
|
||||||
|
# - internal
|
||||||
|
|
||||||
|
#networks:
|
||||||
|
# internal:
|
||||||
|
# internal: true
|
||||||
|
# proxy:
|
||||||
|
# external: true
|
Ładowanie…
Reference in New Issue