version: '3.8' services: flask-app: build: context: . dockerfile: Dockerfile-app depends_on: - db environment: - FLASK_ENV=development - DATABASE_URL=mysql+mysqlconnector://sarbaseuser:password@db/sarbaseapp volumes: - ./certs:/certs nginx: build: context: . dockerfile: Dockerfile-nginx ports: - "80:80" - "443:443" volumes: - ./certs:/certs depends_on: - flask-app db: image: mysql:8.0 volumes: - db-data:/var/lib/mysql - ./init-db:/docker-entrypoint-initdb.d environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: sarbaseapp MYSQL_USER: sarbaseuser MYSQL_PASSWORD: password volumes: db-data: