version: '3'
volumes:
  mssqlsystem:
    driver: local
  mssqluser:
    driver: local    
services:
    ngsurvey:
        image: ngsurvey/ngsurveyee:latest
        restart: always
        ports:
            - 8080:80
        depends_on:
            - ngsurveydb
        command: ["./wait-for-it.sh", "ngsurveydb:1433", "--", "python", "app.py"]
        environment:
            - ConnectionStrings:NGSurveyDB=Server=ngsurveydb;Initial Catalog=ngsurvey;User ID=sa;Password=M@ytheF0rceBeWithYou
    ngsurveydb:
        image: mcr.microsoft.com/mssql/server:2017-latest
        restart: always
        volumes: 
            - mssqlsystem:/var/opt/mssql
            - mssqluser:/var/opt/sqlserver
        environment:
          - SA_PASSWORD=M@ytheF0rceBeWithYou
          - ACCEPT_EULA=Y
          - MSSQL_PID=Express