#version: '2'

services:

  # from hot running the docker: psql -U postgres -l localhost
  vlkb-db:
    container_name: vlkb-db
    image: git.ia2.inaf.it:5050/vialactea/vlkb-db/postgres-pgsphere:latest
    #image: git.ia2.inaf.it:5050/butora/vlkb-datasets/postgres-pgsphere:latest
    #image: registry.gitlab.com/ska-telescope/src/visivo-vlkb-soda:1.5.2
    hostname: vlkb-db
    ports:
            - 5432:5432
    #image: postgres-pgsphere:latest
    #network_mode: "host"
    environment:
      - SECURITY=
      - POSTGRES_PASSWORD=ia2vlkb
    volumes:
      - postgres-data:/var/lib/postgresql/data


  vlkb:
    container_name: vlkb
    image: ingestion:latest
    #image: git.ia2.inaf.it:5050/vialactea/vlkb-soda/ingestion:1.7.10-7-g70b03e9
    hostname: vlkb
    #ports:
    #  - 2222:22
    environment:
      #-OBSCORE_DB_URI=postgresql://vialactea:ia2vlkb@pasquale.ia2.inaf.it:5432/vialacteadevel
      - OBSCORE_DB_URI=postgresql://vialactea:ia2vlkb@vlkb-db:5432/vialactea
      - OBSCORE_DB_SCHEMA=datasets
      - OBSCORE_ACCESS_URL="somedummytext"
    volumes:
      #- /media/robi/WORK/w/git/vlkb-soda/docker/start-vlkb.log:/tmp/start-vlkb.log:rw
      - /srv/vlkb/surveys:/srv/datasets:ro
        #restart: always

volumes:
  postgres-data:

