version: '3'
volumes:
  mysql:
    driver: local
services:
    ngsurvey:
        image: ngsurvey/ngsurveyee:latest
        restart: always
        ports:
           - 8080:80
        depends_on:
           - mysqlngsurveydb
        command: ["./wait-for-it.sh", "mysqlngsurveydb:3306", "--", "python", "app.py"]
        environment:
           - ConnectionStrings:NGSurveyDB=Server=mysqlngsurveydb;Database=ngsurveydb;Uid=root;Pwd=maytheforcebewithyou;
           - NGSurvey:StorageEngine=MySQL
    mysqlngsurveydb:
        image: mysql:8.4.2
        cap_add:
           - SYS_NICE
        restart: always
        volumes:
           - mysql:/var/lib/mysql
        environment:
           - MYSQL_ROOT_PASSWORD=maytheforcebewithyou