services:
  mssql:
    image: mcr.microsoft.com/mssql/server:2019-latest
    container_name: mssql
    environment:
      - SA_PASSWORD=Passw0rd
      - ACCEPT_EULA=Y
    ports:
      - "1433:1433"
    volumes:
      - ./db/data:/var/opt/mssql

  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    container_name: backend
    depends_on:
      - mssql
    environment:
      - DB_SERVER=mssql
      - DB_USER=sa
      - DB_PASSWORD=Passw0rd
      - DB_NAME=CustomerDB
    ports:
      - "8080:8080"
    volumes:
      - ./backend:/app
    command: ./main

networks:
  default:
    driver: bridge
