Using Docker

That's definitely the easiest and most straightforward way of running OWD!

Pre-requisites

Install steps

To be running properly, Open Weight Database needs a PostgreSQL instance. Here is the most simple working Docker Compose configuration:

docker-compose.yaml
version: "3"
services:
  postgres:
    image: postgres:14.2
    restart: always
    env_file:
      - .env
    ports:
      - "5432:5432"
    volumes:
      - data:/var/lib/postgresql/data
  api:
    image: ghcr.io/openweightdatabase/api:main
    env_file:
      .env
    depends_on:
      - postgres
    networks:
      - default
    ports:
      - "3000:3000"
  frontend:
    image: ghcr.io/openweightdatabase/frontend:main
    env_file:
      .env
    depends_on:
      - postgres
      - api
    networks:
      - default
    ports:
      - "8080:8080"
volumes:
  data:

You'll note that the images versions are :main, which are the latest pushes on the main branch.

To ensure that nothing breaks unexpectedly, you should use pinned versions.

You'll also need to create a .env file at the same place than the Docker Compose file. It should contain:

.env
POSTGRES_PASSWORD=<use a robust db password>
POSTGRES_USER=owd
OWD_ADMIN_TOKEN=<generate a robust token for admin>

OWD_API_HOST=api
OWD_API_PORT=3000

To start the Docker Compose stack, run:

$ docker compose up

You should be ready to go!

Last updated