Repository navigation
Example Configurations
We've provided some example configurations to get you going with a simple local development environment for Krampus. To use these, you'll need a local copy of the repository, and Docker installed.
Important
You should not use these setups in a production environment. These are for testing and development only.
Important
None of these setups handle TLS termination, which you'll need to set up before pointing a test Santa client at them.
This setup gives you:
- An instance of Krampus
- A Postgres database instance as the backend
- Authenticated sync, and an auth token you can use with
krampusctlto apply rules
services:
krampus:
build:
context: ./
restart: on-failure
container_name: krampus
environment:
SYNC_SECRET: MySuperSecretSyncSecret
CTL_SECRET: MySuperSecretCTLSecret
PYTHONUNBUFFERED: 1
POSTGRES_HOST: psql
DB_NAME: krampus
POSTGRES_USER: krampus
POSTGRES_PW: supmark
links:
- psql
ports:
- "8000:8000"
psql:
image: postgres:latest
restart: on-failure
environment:
POSTGRES_USER: krampus
POSTGRES_PASSWORD: supmark
POSTGRES_DB: krampus
expose:
- 5432
volumes:
- local_pgdata:/var/lib/postgresql
volumes:
local_pgdata:This setup gives you:
- An instance of Krampus
- A MySQL database instance as the backend
- Authenticated sync, and an auth token you can use with
krampusctlto apply rules
services:
krampus:
build:
context: ./
restart: on-failure
container_name: krampus
environment:
SYNC_SECRET: MySuperSecretSyncSecret
CTL_SECRET: MySuperSecretCTLSecret
PYTHONUNBUFFERED: 1
MYSQL_HOST: mysql
DB_NAME: krampus
MYSQL_USER: krampus
MYSQL_PW: supmark
links:
- mysql
ports:
- "8000:8000"
mysql:
image: mysql:8.4
restart: on-failure
container_name: krampus_db
environment:
MYSQL_DATABASE: krampus
MYSQL_USER: krampus
MYSQL_PASSWORD: supmark
MYSQL_RANDOM_ROOT_PASSWORD: "true"
volumes:
- local_mysqldata:/var/lib/mysql
volumes:
local_mysqldata:This setup gives you an instance of Krampus, backed by a Firestore database named krampus in a GCP project named my-test-project.
You should supply your own Firestore database name, GCP project name, and a Service Account key for a Service Account with (at least) roles/datastore.user in your GCP project.
Warning
Service Account Keys should be considered sensitive, and handled with care. A leaked Service Account Key can be used to incur spend on your GCP projects. Please use them sparingly.
services:
krampus:
build:
context: ./
restart: on-failure
container_name: krampus
environment:
PYTHONUNBUFFERED: 1
GCP_PROJ_ID: "my-test-project"
DB_NAME: "krampus"
GOOGLE_APPLICATION_CREDENTIALS: "/run/secrets/service_account_key"
KRAMPUS_EVENT_HANDLER_SUMMARY: True
ports:
- "8000:8000"
secrets:
- service_account_key
secrets:
service_account_key:
file: /path/to/service/account/key.json