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: frontend:
build: build:
context: frontend context: frontend
ports:
- 8080:80
environment: 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: db:
image: postgres:17-alpine image: postgres:17-alpine
env_file: env_file:
- .env - .env
# ports:
# - "5432:5432"
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin"] test: ["CMD-SHELL", "pg_isready -U admin"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks:
- app-network
coordinator: coordinator:
build: build:
@ -35,8 +43,16 @@ services:
interval: 20s interval: 20s
timeout: 10s timeout: 10s
retries: 10 retries: 10
ports: labels:
- 5050:5000 - "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: ocr:
build: build:
@ -48,16 +64,18 @@ services:
- EXXETA_SERVICE_URL=http://exxeta:5000/extract - EXXETA_SERVICE_URL=http://exxeta:5000/extract
- SPACY_SERVICE_URL=http://spacy:5052/extract - SPACY_SERVICE_URL=http://spacy:5052/extract
- COORDINATOR_URL=http://coordinator:5000 - COORDINATOR_URL=http://coordinator:5000
ports: networks:
- 5051:5000 - app-network
spacy: spacy:
build: build:
context: backend/spacy-service context: backend/spacy-service
environment: environment:
- VALIDATE_SERVICE_URL=http://validate:5000/validate - VALIDATE_SERVICE_URL=http://validate:5000/validate
ports: volumes:
- 5052:5052 - ./backend/spacy-service/spacy_training:/app/spacy_training
networks:
- app-network
exxeta: exxeta:
build: build:
@ -68,8 +86,8 @@ services:
environment: environment:
- VALIDATE_SERVICE_URL=http://validate:5000/validate - VALIDATE_SERVICE_URL=http://validate:5000/validate
- COORDINATOR_URL=http://coordinator:5000 - COORDINATOR_URL=http://coordinator:5000
ports: networks:
- 5053:5000 - app-network
validate: validate:
build: build:
@ -79,5 +97,11 @@ services:
- .env - .env
environment: environment:
- COORDINATOR_URL=http://coordinator:5000 - COORDINATOR_URL=http://coordinator:5000
ports: networks:
- 5054:5000 - app-network
networks:
traefik_default:
external: true
app-network:
driver: bridge