Spaces:
Sleeping
Sleeping
File size: 4,482 Bytes
1c8e50c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
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
|