version: "3.8" services: db: build: ./db environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: test restart: always web: build: ./web environment: MYSQL_DATABASE: test MYSQL_USER: root MYSQL_PASSWORD: password MYSQL_HOST: db ports: - "5000:5000" depends_on: - db restart: on-failure