version: '3.8' services: notes-app-db: container_name: notes-app-db image: mysql:8.0 environment: MYSQL_ROOT_PASSWORD: root_password MYSQL_DATABASE: notes_db MYSQL_USER: notes_user MYSQL_PASSWORD: notes_password volumes: - ./develop_a_working_20251006_065420-develop_a_working_20251006_065420-d-d/authsec_mysql/mysql/wf_table/wf_table.sql:/docker-entrypoint-initdb.d/wf_table.sql ports: - "3306:3306" # Exposing for potential debugging/access, but backend connects internally healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] timeout: 20s retries: 10 networks: - notes-app-network notes-app-backend: container_name: notes-app-backend build: context: . dockerfile: Dockerfile.backend ports: - "9501:8080" environment: SPRING_DATASOURCE_URL: jdbc:mysql://notes-app-db:3306/notes_db SPRING_DATASOURCE_USERNAME: notes_user SPRING_DATASOURCE_PASSWORD: notes_password SPRING_JPA_HIBERNATE_DDL_AUTO: update volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: notes-app-db: condition: service_healthy networks: - notes-app-network notes-app-frontend: container_name: notes-app-frontend build: context: . dockerfile: Dockerfile.frontend ports: - "9010:80" depends_on: - notes-app-backend networks: - notes-app-network networks: notes-app-network: driver: bridge