version: '2'

services:

  vlkb-db:
    container_name: vlkb-db
    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: soda:latest
    #image: git.ia2.inaf.it:5050/butora/vlkb-datasets/soda:latest
    hostname: vlkb
    ports:
           - 8080:8080
    environment:
      - SECURITY=
        #- SECURITY=ia2token
        #- VLKBOBSCORE_PG_URI=postgresql://vialactea:ia2vlkb@pasquale.ia2.inaf.it:5432/vialactea
      - ACCESS_CONTEXT_ROOT=vlkb#datasets
      - URL_CUTOUTS=vlkb-devel.ia2.inaf.it:8004/cutouts
      - RESPONSE_FORMAT=application/x-vlkb+xml
      #- RESPONSE_FORMAT=application/fits
      #- RESPONSE_FORMAT=application/fits;createfile=yes
    volumes:
      - /srv/vlkb/surveys:/srv/surveys:z,ro
      - /srv/vlkb/cutouts:/srv/cutouts:z,rw
        #restart: always


volumes:
  postgres-data:

