# ------------------------------------------------------------------------------
# Copyright (C) 2022 European Spallation Source ERIC.
# ------------------------------------------------------------------------------

version: '3.7'
services:
  naming:
    build: ./
    ports:
      - "8080:8083"
    depends_on:
      - postgres
    command: "java -jar /naming/naming-backend.jar"
  
  postgres:
    container_name: "postgres"
    image: "postgres:9.6.7"
    ports:
      - "5432:5432"
    environment:
      POSTGRES_DB: discs_names
      POSTGRES_USER: discs_names
      POSTGRES_PASSWORD: discs_names
      PGDATA: /var/lib/postgresql/data/pgdata
    volumes:
      - naming-data:/var/lib/postgresql/data/pgdata

volumes:
  naming-data:
