This repository holds a local Docker-based setup so you can run other tools and services on your machine with a small, repeatable stack: a reverse proxy, a relational database, and object storage.
Use it when you want shared infrastructure (for example Traefik in front of containers, Postgres for apps, MinIO for S3-style buckets) without installing those components directly on the host.
- Traefik — published host ports: HTTP 80 and HTTPS 443. Routes to backends use the Docker provider and a small file provider for the dashboard.
- PostgreSQL — published on the host as
localhost:POSTGRES_PORT(default 5432), mapped straight to the database container (not through Traefik). From another container ontraefik-public, use hostpostgresand port 5432. Many apps can share that server; each uses its owndbname(create withCREATE DATABASEor your tooling). Local clients often needsslmode=disablein the URL. - MinIO — S3 API at
http://minio.<TRAEFIK_DOMAIN>/and console athttp://minio-console.<TRAEFIK_DOMAIN>/(e.g.http://minio.localhost/andhttp://minio-console.localhost/), both only via Traefik on port 80. Use the MinIO client (mc) against the S3 hostname.
See docker-compose.yml for images, ports, and restart: on-failure on the long-running services.
-
Copy the environment template and edit values (especially passwords) if you are not only experimenting locally:
cp .env.example .env
-
Ensure the shared Traefik network exists, then start the stack:
docker network inspect traefik-public >/dev/null 2>&1 || docker network create traefik-public docker compose up -d
-
If host ports are already taken (common:
5432,80), set overrides in.env— see.env.exampleforPOSTGRES_PORTandTRAEFIK_DOMAIN.
Traefik listens on port 80 for HTTP routing (including the dashboard at http://127.0.0.1/dashboard/ and the API under /api/). Example Postgres URL from the host: postgresql://USER:PASSWORD@127.0.0.1:5432/DBNAME?sslmode=disable (adjust user, password, db, and POSTGRES_PORT from .env).
Compose treats traefik-public as an external network (see docker-compose.yml), so Docker must already have that network—no “created by compose” mismatch and no WARN … exists but was not created by compose.
- Create the network if needed:
docker network create traefik-public(risk-control’sjust upalso creates it when missing). - Start this stack:
docker compose up -dfrom this directory so Traefik (and anything else here) joinstraefik-public. - In risk-control
.env, set Traefik entrypoints to match this proxy:TRAEFIK_ENTRYPOINT_HTTP=web,TRAEFIK_ENTRYPOINT_HTTPS=websecure, and keepTRAEFIK_DOCKER_NETWORK=traefik-public. - Run
just upin risk-control so app containers join the same network; Traefik discovers them via the Docker provider.
HTTP entrypoints here are named web and websecure (not http/https).
On Docker Engine 29+, older Traefik builds used a Docker HTTP client API version that the engine rejects, so the Docker provider never loads and no routes appear from container labels. Logs repeat Failed to retrieve information of the docker client and server host. This stack uses Traefik v3.6+, which negotiates the API version; run docker compose pull traefik && docker compose up -d here after upgrading this repo.
All variables used by Compose are documented with defaults in .env.example. None are strictly required for a first run; Compose supplies defaults in docker-compose.yml when a variable is unset.