version: '3.3' services: mysql: image: mysql:latest restart: always volumes: - database:/var/lib/mysql environment: MYSQL_DATABASE: 'db' MYSQL_USER: 'user' MYSQL_PASSWORD: 'password' MYSQL_ROOT_PASSWORD: 'rootPassword' command: --default-authentication-plugin=mysql_native_password ports: - 3306:3306 networks: - backend - frontend app: build: context: ./docker dockerfile: php-fpm.docker volumes: - "./public/:/app/public" - "./src/:/app/src" depends_on: - mysql networks: - backend nginx: build: context: ./docker dockerfile: nginx.docker volumes: - "./public/:/app/public" ports: - 80:80 depends_on: - app networks: - frontend - backend volumes: database: networks: frontend: external: name: proxy_proxy backend: