Spaces:
Sleeping
Sleeping
| version: '3.8' | |
| services: | |
| mongo: | |
| image: mongo:6.0 | |
| container_name: task-management-mongo | |
| restart: unless-stopped | |
| ports: | |
| - "27017:27017" | |
| volumes: | |
| - mongo-data:/data/db | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| zipkin: | |
| image: openzipkin/zipkin:latest | |
| container_name: task-management-zipkin | |
| restart: unless-stopped | |
| ports: | |
| - "9411:9411" | |
| networks: | |
| - task-management-network | |
| eureka-server: | |
| build: | |
| context: ./EurekaServerConfiguration | |
| dockerfile: Dockerfile | |
| container_name: task-management-eureka | |
| restart: unless-stopped | |
| ports: | |
| - "8085:8085" | |
| environment: | |
| SPRING_PROFILES_ACTIVE: docker | |
| ZIPKIN_BASE_URL: http://zipkin:9411 | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "curl", "-sf", "http://localhost:8085/actuator/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| start_period: 60s | |
| user-service: | |
| build: | |
| context: ./TaskUserService | |
| dockerfile: Dockerfile | |
| container_name: task-management-user-service | |
| restart: unless-stopped | |
| ports: | |
| - "8081:8081" | |
| environment: | |
| SPRING_PROFILES_ACTIVE: docker | |
| EUREKA_SERVER_URI: http://eureka-server:8085/eureka | |
| MONGODB_URI: mongodb://mongo:27017/users | |
| ZIPKIN_BASE_URL: http://zipkin:9411 | |
| TASK_ALLOWED_ORIGINS: http://task-management-ui:3000,http://localhost:3000 | |
| depends_on: | |
| mongo: | |
| condition: service_healthy | |
| eureka-server: | |
| condition: service_healthy | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "curl", "-sf", "http://localhost:8081/actuator/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| start_period: 60s | |
| task-service: | |
| build: | |
| context: ./TaskService | |
| dockerfile: Dockerfile | |
| container_name: task-management-task-service | |
| restart: unless-stopped | |
| ports: | |
| - "8082:8082" | |
| environment: | |
| SPRING_PROFILES_ACTIVE: docker | |
| EUREKA_SERVER_URI: http://eureka-server:8085/eureka | |
| MONGODB_URI: mongodb://mongo:27017/tasks | |
| ZIPKIN_BASE_URL: http://zipkin:9411 | |
| depends_on: | |
| mongo: | |
| condition: service_healthy | |
| eureka-server: | |
| condition: service_healthy | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "curl", "-sf", "http://localhost:8082/actuator/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| start_period: 60s | |
| task-submission-service: | |
| build: | |
| context: ./TaskSubmissionService | |
| dockerfile: Dockerfile | |
| container_name: task-management-submission-service | |
| restart: unless-stopped | |
| ports: | |
| - "8083:8083" | |
| environment: | |
| SPRING_PROFILES_ACTIVE: docker | |
| EUREKA_SERVER_URI: http://eureka-server:8085/eureka | |
| MONGODB_URI: mongodb://mongo:27017/submissions | |
| ZIPKIN_BASE_URL: http://zipkin:9411 | |
| depends_on: | |
| mongo: | |
| condition: service_healthy | |
| eureka-server: | |
| condition: service_healthy | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "curl", "-sf", "http://localhost:8083/actuator/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| start_period: 60s | |
| api-gateway: | |
| build: | |
| context: ./APIGateWay | |
| dockerfile: Dockerfile | |
| container_name: task-management-api-gateway | |
| restart: unless-stopped | |
| ports: | |
| - "8090:8090" | |
| environment: | |
| SPRING_PROFILES_ACTIVE: docker | |
| EUREKA_SERVER_URI: http://eureka-server:8085/eureka | |
| ZIPKIN_BASE_URL: http://zipkin:9411 | |
| GATEWAY_ALLOWED_ORIGIN_1: http://task-management-ui:3000 | |
| GATEWAY_ALLOWED_ORIGIN_2: http://localhost:3000 | |
| depends_on: | |
| eureka-server: | |
| condition: service_healthy | |
| user-service: | |
| condition: service_healthy | |
| task-service: | |
| condition: service_healthy | |
| task-submission-service: | |
| condition: service_healthy | |
| networks: | |
| - task-management-network | |
| healthcheck: | |
| test: ["CMD", "curl", "-sf", "http://localhost:8090/actuator/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 5 | |
| start_period: 60s | |
| volumes: | |
| mongo-data: | |
| driver: local | |
| networks: | |
| task-management-network: | |
| driver: bridge | |
| name: task-management-network | |