Skip to content

HOW TO install Open Prices

Prerequisites

  • Python 3.11 (lower version may be OK, but untested)
  • PostgreSQL 13 (lower version may be OK, but untested)

Setup

# Clone repo
git clone https://github.com/openfoodfacts/open-prices.git
cd open-prices

Without Docker

# Install uv (Python dependency manager)
# see https://docs.astral.sh/uv/

# Install dependencies (pyproject.toml)
uv sync

# Apply migrations
uv run --env-file .env python manage.py migrate

# Run Locally
uv run --env-file .env python manage.py runserver

# Now the server will run on http://127.0.0.1:8000 !

# Note: you can change the port if you want
uv run python manage.py runserver 8001

With Docker

::: Info Open Prices now only supports docker compose v2 ( docker compose ) :::

create the dockers with

docker compose up

The sever should be running on http://127.0.0.1:8000/.

The run the migration of the database with

make migrate-db

Congrats, you can now contribute to the codebase :tada: