cern-sis / issues-inspire

0 stars 0 forks source link

separate dbs (names) for inspirehep, workflows and backoffice #587

Closed drjova closed 3 weeks ago

DonHaul commented 1 month ago

Is this regarding, the dockercompose?

I investigated a bit and its uncommon to have multiple dbs running in the same container - from what I checked at the time it might require some heavy meddling with the docker compose files. Implementation to be checked. maybe a simple config like this will work

version: '3'
services:
  db:
    image: postgres
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: inspirehep
    ports:
      - "5432:5432"
    volumes:
      - ./db-data:/var/lib/postgresql/data
    command: >
      bash -c "postgres && psql -U user -c 'CREATE DATABASE backoffice;' && psql -U user -c 'CREATE DATABASE airflow;"