Traefik configuration

deploy_exxeta
s8613 2025-06-29 15:07:09 +02:00
parent d872d53672
commit c4fcfef4f0
1 changed files with 40 additions and 16 deletions

View File

@ -2,22 +2,30 @@ services:
frontend:
build:
context: frontend
ports:
- 8080:80
environment:
- API_HOST=http://localhost:5050
- API_HOST=http://ec2-18-193-8-169.eu-central-1.compute.amazonaws.com/ff-pai
labels:
- "traefik.enable=true"
- "traefik.http.routers.ff-frontend.rule=PathPrefix(`/ff/`)"
- "traefik.http.routers.ff-frontend.entrypoints=web"
- "traefik.http.services.ff-frontend.loadbalancer.server.port=80"
- "traefik.http.middlewares.ff-frontend-stripprefix.stripprefix.prefixes=/ff"
- "traefik.http.routers.ff-frontend.middlewares=ff-frontend-stripprefix"
networks:
- traefik_default
- app-network
db:
image: postgres:17-alpine
env_file:
- .env
# ports:
# - "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app-network
coordinator:
build:
@ -31,12 +39,20 @@ services:
db:
condition: service_healthy
healthcheck:
test: wget --spider --no-verbose http://127.0.0.1:5000/health || exit 1
test: wget --spider --no-verbose http://127.0.0.1:5000/health || exit 1
interval: 20s
timeout: 10s
retries: 10
ports:
- 5050:5000
labels:
- "traefik.enable=true"
- "traefik.http.routers.ff-api.rule=PathPrefix(`/ff-api/`)"
- "traefik.http.routers.ff-api.entrypoints=web"
- "traefik.http.services.ff-api.loadbalancer.server.port=5000"
- "traefik.http.middlewares.ff-api-stripprefix.stripprefix.prefixes=/ff-api"
- "traefik.http.routers.ff-api.middlewares=ff-api-stripprefix"
networks:
- traefik_default
- app-network
ocr:
build:
@ -48,16 +64,18 @@ services:
- EXXETA_SERVICE_URL=http://exxeta:5000/extract
- SPACY_SERVICE_URL=http://spacy:5052/extract
- COORDINATOR_URL=http://coordinator:5000
ports:
- 5051:5000
networks:
- app-network
spacy:
build:
context: backend/spacy-service
environment:
- VALIDATE_SERVICE_URL=http://validate:5000/validate
ports:
- 5052:5052
volumes:
- ./backend/spacy-service/spacy_training:/app/spacy_training
networks:
- app-network
exxeta:
build:
@ -68,8 +86,8 @@ services:
environment:
- VALIDATE_SERVICE_URL=http://validate:5000/validate
- COORDINATOR_URL=http://coordinator:5000
ports:
- 5053:5000
networks:
- app-network
validate:
build:
@ -79,5 +97,11 @@ services:
- .env
environment:
- COORDINATOR_URL=http://coordinator:5000
ports:
- 5054:5000
networks:
- app-network
networks:
traefik_default:
external: true
app-network:
driver: bridge