.devcontainer
What the shared development environment contains: services, ports, and first-boot provisioning.
In brief
One environment for the whole team, described by .devcontainer/. You open the repository, the container brings up its internal stack in a nested Docker daemon, and post-create.sh provisions the database, secrets, and billing. Nothing is installed by hand.
Opening it
In VS Code, open the repository, then "Reopen in Container" — the Dev Containers extension does the rest. From the command line, the official CLI does the same:
devcontainer up --workspace-folder .The first boot builds the image and provisions the environment; it takes several minutes. Later ones reuse the container. Once inside:
make up && make migrate && make devThe working container is called tools. It opens the repository at /workspaces/brume as user vscode, with Python, Node, pnpm, uv, Helm, and the project CLIs already in place. A tool installed by hand disappears on the next rebuild: whatever must survive lives in .devcontainer/Dockerfile.
The internal stack
The container does not work alone. postStartCommand runs stack-up.sh, which starts .devcontainer/stack.compose.yml inside the container's own nested Docker daemon (no host Docker socket, DEC-016) and writes /etc/hosts aliases on 127.0.1.x so these names keep resolving from tools, exactly as they did as compose siblings.
| Service | Role | Access from the container |
|---|---|---|
postgres | Application database, with pgvector | postgres:5432 |
minio | Object storage for files | minio:9000, console minio:9001 |
keycloak | OIDC provider for the SSO path | keycloak:8080 |
lago-api and its satellites | Enterprise billing (lago-db, lago-redis, lago-worker, lago-clock, lago-front, lago-pdf) | lago-api:3000, UI at lago-front:80 |
The applications themselves run inside the tools container: backend on 8000, frontend on 3000, documentation on 3001, marketing site on 3002. Those ports are forwarded to your machine, as are Postgres, MinIO, Keycloak, and Lago.
What the first boot does
post-create.sh runs once when the container is created, and replays without harm. It installs dependencies, creates .env from .env.example and generates the secrets left blank, provisions the application database role then applies migrations, and registers the Lago metrics and plans.
A database recreated later is no longer provisioned
post-create.sh does not replay on its own. After a database reset, a fresh volume, or a make db-pull, it is make migrate that provisions the application role again before migrating. The reset itself is done by recreating the throwaway Postgres: make down && make up && make migrate.
Where to add what
| What you add | The file |
|---|---|
| System package or CLI | .devcontainer/Dockerfile |
| Idempotent initialization step | .devcontainer/post-create.sh |
| Extension, editor setting, port | .devcontainer/devcontainer.json |
| Personal state, yours alone | ~/.home/dotfiles/ |
For the Enterprise edition, the opt-in progression from Community is described in Enable the Enterprise Edition in the devcontainer.