A dead simple and secure HTTP redirect server for the Killing Floor Dedicated Server (KFDS).
2.1K
A Docker image for the Killing Floor Redirect Server (kfrs) based on the official Alpine Linux image.
Environment variables can be provided when creating a container to define the server configuration:
| Variable | Default value | Description |
|---|---|---|
| KFRS_HOST | 0.0.0.0 | IP/Host to bind to. |
| KFRS_PORT | 9090 | TCP port to listen on. |
| KFRS_SERVE_DIR | ./redirect | Directory to serve files from. |
| KFRS_MAX_REQUESTS | 20 | Max requests per IP/minute before banning. |
| KFRS_BAN_TIME | 15 | Ban duration (in minutes). |
| KFRS_LOG_TO_FILE | false | Enable file logging. |
| KFRS_LOG_LEVEL | info | Log level (info, debug, warn, error). |
| KFRS_LOG_FILE | ./kfrs.log | Log file path. |
| KFRS_LOG_FILE_FORMAT | text | Log format (text or json). |
| KFRS_LOG_MAX_SIZE | 10 | Max log file size (MB). |
| KFRS_LOG_MAX_BACKUPS | 5 | Max number of old log files to keep. |
| KFRS_LOG_MAX_AGE | 28 | Max age of a log file (days). |
Run the server using default configuration.
Make sure the
./redirectdirectory exists before starting the container.
docker run -d \
--name kfrs \
-p 9090:9090/tcp \
-v $(pwd)/redirect:/home/kfrs/redirect \
-i k4rian/kfrs
Run the server with all environment variables set and file logging enabled.
Absolute paths are used for clarity.
docker run -d \
--name kfrs \
-p 9090:9090/tcp \
-e KFRS_HOST="0.0.0.0" \
-e KFRS_PORT=9090 \
-e KFRS_SERVE_DIR="/home/kfrs/redirect" \
-e KFRS_MAX_REQUESTS=20 \
-e KFRS_BAN_TIME=15 \
-e KFRS_LOG_TO_FILE=true \
-e KFRS_LOG_LEVEL="info" \
-e KFRS_LOG_FILE="/home/kfrs/kfrs.log" \
-e KFRS_LOG_FILE_FORMAT="text" \
-e KFRS_LOG_MAX_SIZE=10 \
-e KFRS_LOG_MAX_BACKUPS=5 \
-e KFRS_LOG_MAX_AGE=28 \
-v $(pwd)/redirect:/home/kfrs/redirect \
-i k4rian/kfrs
See the docker-compose.yml file.
Requirements:
— Docker >= 18.09.0
— Git (optional)
Like any Docker image the building process is pretty straightforward:
git clone https://github.com/K4rian/kfrs.git .
cd docker/ && docker build --no-cache -t k4rian/kfrs .
Content type
Image
Digest
sha256:c9d8ac8ba…
Size
13.2 MB
Last updated
over 1 year ago
docker pull k4rian/kfrs