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
    image: git.ia2.inaf.it:5050/vialactea/vlkb-soda/soda:1.6.3
    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
      - URL_CUTOUTS=http://localhost:8080/vlkb/datasets/cutouts
      - RESPONSE_FORMAT=application/x-vlkb+xml
      #- RESPONSE_FORMAT=application/fits
      #- RESPONSE_FORMAT=application/fits;createfile=yes
      #- AMQP_QUEUE_NAME=vlkb#datasets
    volumes:
      - /srv/vlkb/surveys:/srv/surveys:ro
      - /srv/vlkb/cutouts:/srv/cutouts:rw
        #restart: always


volumes:
  postgres-data:

