version: "3.8" services: backend: build: context: . ports: - "8080:8080" environment: DB_USERNAME: root DB_PASSWORD: chronos DATASOURCE_URL: jdbc:mysql://database:3306/chronos depends_on: - database networks: - app-network database: image: mysql:8.0 environment: MYSQL_ROOT_PASSWORD: chronos MYSQL_DATABASE: chronos volumes: - db_data:/var/lib/mysql networks: - app-network networks: app-network: volumes: db_data: