# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json volumes: mysql_data: pipeline_scripts: pipeline_build_logs: networks: app: services: mysql-db: image: mysql:8.0 profiles: - full container_name: mysql-db environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-} MYSQL_DATABASE: pipeline MYSQL_USER: ${DB_USERNAME:-} MYSQL_PASSWORD: ${DB_PASSWORD:-} ports: - "3306:3306" volumes: - mysql_data:/var/lib/mysql networks: - app healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 5s timeout: 5s retries: 10 auth-service: image: quay.io/keycloak/keycloak:26.2.5 profiles: - full container_name: auth-service environment: KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: admin KC_DB: ${DB:-} KC_DB_URL: ${DB_URL:-} KC_DB_USERNAME: ${DB_USERNAME:-} KC_DB_PASSWORD: ${DB_PASSWORD:-} KC_HOSTNAME: http://localhost:8180 KC_HOSTNAME_STRICT: false KC_HEALTH_ENABLED: true KC_LOG_CONSOLE_FORMAT: "%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c trace_id=%X{traceId} span_id=%X{spanId} - %s%e%n" ports: - "8180:8080" command: start-dev --import-realm healthcheck: test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000 && echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && grep -q '\"status\": \"UP\"' <&3"] interval: 10s timeout: 5s retries: 3 start_period: 20s volumes: - ./keycloak-realm.json:/opt/keycloak/data/import/realm.json networks: - app depends_on: mysql-db: condition: service_healthy flagd: image: ghcr.io/open-feature/flagd:latest profiles: - full container_name: flagd command: start --uri file:./etc/flagd/feature-flags.json volumes: - ./flags/feature-flags.json:/etc/flagd/feature-flags.json ports: - "8016:8016" networks: - app pipeline-app: build: context: . dockerfile: pipeline/Dockerfile profiles: - full image: pipeline-app container_name: pipeline-app environment: SPRING_PROFILES_ACTIVE: demo DB_URL: ${DB_URL:-} DB_USER: ${DB_USERNAME:-} DB_PASSWORD: ${DB_PASSWORD:-} AUTH_HOST: auth-service AUTH_PORT: 8080 OTEL_SERVICE_NAME: pipeline-app FEATURE_PROVIDER_URI: http://flagd:8016 ports: - "8080:8080" healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/actuator/health || exit 1"] interval: 15s timeout: 5s retries: 3 start_period: 30s volumes: - pipeline_scripts:/app/pipeline_scripts - pipeline_build_logs:/app/pipeline_build_logs networks: - app depends_on: mysql-db: condition: service_healthy auth-service: condition: service_healthy flagd: condition: service_started mock-api: image: stoplight/prism:5 profiles: - mock command: mock /spec/pipeline-service.yaml -h 0.0.0.0 --dynamic --multiprocess=false volumes: - ./apis/openapi-spec/pipeline-service.yaml:/spec/pipeline-service.yaml ports: - "4010:4010" networks: - app pipeline-ui: build: context: . dockerfile: pipeline-ui/Dockerfile args: VITE_API_BASE_URL: http://localhost:8080/api/v1 VITE_IDP: keycloak VITE_KC_URL: http://localhost:8180 VITE_KC_REALM: SpringBootRealm VITE_KC_CLIENTID: pipeline-app profiles: - full image: pipeline-ui ports: - "3000:3000" networks: - app depends_on: pipeline-app: condition: service_started pipeline-ui-mock: build: context: . dockerfile: pipeline-ui/Dockerfile args: ENV_FILE: .env.local-with-mock profiles: - mock ports: - "3000:3000" networks: - app depends_on: - mock-api