Warning
Not the recommended setup. Use the Dev Container unless you need Python on your host (e.g. an IDE or debugger that cannot work in a container). Here you install and maintain Python 3.15 and the dependencies yourself, and this setup is less tested.
Warning
Do not mix it with the Dev Container in the same checkout.
- Both generate the same
*.inifiles, with different service hostnames (localhosthere, the container names there). After switching, regenerate them:make load-envhere,bash .devcontainer/setup.shin the dev container. - They use different Compose files and volumes (
docker-compose.ymlhere,.devcontainer/docker-compose.ymlthere): their databases are separate, so do not run both stacks. - The root
docker-compose.ymlpublishes PostgreSQL, Elasticsearch and Redis on127.0.0.1:5432,:9200and:6379: stop any local service using these ports.
Only the setup differs: the configuration, the data, running the API, the tests and the linting are described in the README, and the commands work the same here, run on your host.
- Linux, macOS, or Windows with WSL (native Windows is not supported).
- uv 0.13 or newer: it installs Python 3.15 and the locked dependencies.
- Docker with Compose v2, or Podman (see Podman).
- GNU make (
make helplists the targets).
git clone https://github.com/c2corg/v6_api && cd v6_api
cp config/env.local.sample config/env.local # points the configuration to localhost
make bootstrap # with Podman: export DOCKER_COMPOSE="podman compose" first
make serve # then http://localhost:6543/healthmake bootstrap starts the services of docker-compose.yml and waits for them to be healthy
(make start), installs the dependencies in .venv and the git pre-commit hook (make install),
generates the *.ini files (make load-env), migrates the dev database (make init-database),
creates the test database (make init-test-database) and checks or rebuilds the search index
(make init-elastic). Each step can be re-run on its own.
The make targets run Python with uv run. For the other Python commands of the README
(pytest, alembic…), prefix them with uv run or activate the virtual environment first:
source .venv/bin/activate.
make start # start the services (they keep their data)
make serve # plus make run-syncer and make run-background-jobs, one terminal each
make stop # stop the servicesAfter pulling or switching branches: make install load-env init-database init-elastic.
To start again from a fresh database and index (deletes your local data):
docker compose down -v # removes the volumes postgres18_data and es_data
docker compose pull
make bootstrapThe volume postgres_data of the former setup (PostGIS 16 and the 2018 Elasticsearch image) is no
longer used and can be removed. An es_data volume of Elasticsearch 2.4 cannot be read by Elasticsearch 8:
remove it (docker compose down -v above) before the first start.