services:
  db:
    build: ./PostgressDB
    container_name: Beyond_Heroes_War_DB
    ports:
      - "6732:5432"
    environment:
      POSTGRES_DB: BHDB
      POSTGRES_USER: APIUser
      POSTGRES_PASSWORD: APIUserPw
      POSTGRES_HOST_AUTH_METHOD: trust
      POSTGRES_INITDB_ARGS: --auth-host=trust --auth-local=trust
    volumes:
      - ./PostgressDB/init.sql:/docker-entrypoint-initdb.d/init.sql
    networks:
      - bhnetwork
  bhserver:
    container_name: Beyond_Heroes_War_Server
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "32770:8080"
    networks:
      - bhnetwork
        
networks:
  bhnetwork:
    driver: bridge