-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose_coordinator.yml
59 lines (51 loc) · 2.33 KB
/
docker-compose_coordinator.yml
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
version: '3.9'
volumes:
coordinator_camera_database:
services:
fastapi_app:
build:
context: .
dockerfile: Dockerfile_app
image: fastapi_app:latest
user: root
container_name: fastapi_app
ports:
- "4444:4444"
volumes:
- ./coordinator:/workspace/coordinator/
labels:
# Declare traefik routers
- "traefik.enable=true"
# - "traefik.http.routers.coordinator.rule=PathPrefix(`/api/xface/v1/coordinator`)"
- "traefik.http.routers.coordinator.rule=PathPrefix(`/api/xface/v1/coordinator`)"
- "traefik.http.routers.coordinator.entrypoints=web"
- "traefik.http.routers.coordinator.service=coordinator-service"
- "traefik.http.routers.coordinator.middlewares=strip-coordinator-prefix"
- "traefik.http.middlewares.strip-coordinator-prefix.stripprefix.prefixes=/api/xface/v1/coordinator"
# - "traefik.http.routers.coordinator.middlewares=authorization"
# Declare traefik services
- "traefik.http.services.coordinator-service.loadbalancer.server.port=${COORDINATOR_SERVICE_PORT:-4444}"
# - "traefik.http.services.coordinator-service.loadbalancer.healthcheck.path=/"
# - "traefik.http.services.coordinator-service.loadbalancer.healthcheck.interval=5s"
# - "traefik.http.services.coordinator-service.loadbalancer.healthcheck.timeout=30s"
# - "traefik.http.services.enterprise-service.loadbalancer.healthcheck.port=9031"
# Declare traefik middlewares
# - "traefik.http.middlewares.authorization.forwardauth.address=http://${ACCOUNT_SERVICE_CONTAINER_NAME:-account-service}:${ACCOUNT_SERVICE_PORT:-9031}/api/xface/v1/accounts/auth"
# - "traefik.http.middlewares.authorization.forwardauth.trustForwardHeader=true"
networks:
- services-network
coordinator:
build:
context: .
dockerfile: Dockerfile_coordinator
image: coordinator:latest
user: root
container_name: coordinator
networks:
- services-network
volumes:
- ./coordinator:/workspace/coordinator/
networks:
services-network:
external:
name: ${COORDINATOR_SERVICES_NETWORK}