# The containers that compose the project
services:
  # TODO: currently we define only one database here, and it's used both
  # for local development (eg it is started when you run `npm run start`)
  # AND for tests. We should split this into two services: one for local
  # development and one for tests. The dotenv-cli packages could help per
  # https://www.prisma.io/docs/guides/development-environment/environment-variables/using-multiple-env-files
  test_db:
    image: postgres:14
    restart: always
    container_name: test-db-prisma
    ports:
      - "5433:5432"
    environment:
      # To connect locally run `docker ps` to get the container id then:
      #   docker exec -it <container id> psql -U testuser local
      POSTGRES_USER: testuser
      POSTGRES_PASSWORD: testpw
      POSTGRES_DB: test
