Skip to content

Commit bfff113

Browse files
authored
UN-3018 [FIX] Update PathPrefix syntax for Traefik v3 compatibility (#1670)
fix: Update PathPrefix syntax for Traefik v3 compatibility Traefik v3 changed PathPrefix matcher to accept only one argument. Updated all multi-argument PathPrefix rules to use separate matchers combined with || or &&.
1 parent 2986829 commit bfff113

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

docker/docker-compose-dev-essentials.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ services:
6363

6464
reverse-proxy:
6565
# The official v2 Traefik docker image
66-
image: traefik:v2.10
66+
image: traefik:v3.6.2
6767
container_name: unstract-proxy
6868
restart: unless-stopped
6969
# - Enables the web UI.
@@ -142,8 +142,8 @@ services:
142142
env_file:
143143
- ./essentials.env
144144
ports:
145-
- "5672:5672" # AMQP port
146-
- "15672:15672" # Management UI port
145+
- "5672:5672" # AMQP port
146+
- "15672:15672" # Management UI port
147147
volumes:
148148
- rabbitmq_data:/var/lib/rabbitmq
149149

docker/docker-compose.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
- APPLICATION_NAME=unstract-backend
3333
labels:
3434
- traefik.enable=true
35-
- traefik.http.routers.backend.rule=Host(`frontend.unstract.localhost`) && PathPrefix(`/api/v1`, `/deployment`)
35+
- traefik.http.routers.backend.rule=Host(`frontend.unstract.localhost`) && (PathPrefix(`/api/v1`) || PathPrefix(`/deployment`))
3636
extra_hosts:
3737
# "host-gateway" is a special string that translates to host docker0 i/f IP.
3838
- "host.docker.internal:host-gateway"
@@ -58,7 +58,6 @@ services:
5858
- ./workflow_data:/data
5959
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
6060

61-
6261
# Celery worker for managing logs and periodic tasks
6362
worker-logging:
6463
image: unstract/backend:${VERSION}
@@ -154,8 +153,8 @@ services:
154153
- ../backend/.env
155154
- ./essentials.env
156155
depends_on:
157-
- db
158-
- rabbitmq
156+
- db
157+
- rabbitmq
159158
environment:
160159
- ENVIRONMENT=development
161160
- APPLICATION_NAME=unstract-celery-beat
@@ -174,7 +173,7 @@ services:
174173
- ENVIRONMENT=development
175174
labels:
176175
- traefik.enable=true
177-
- traefik.http.routers.frontend.rule=Host(`frontend.unstract.localhost`) && !PathPrefix(`/api/v1`, `/deployment`)
176+
- traefik.http.routers.frontend.rule=Host(`frontend.unstract.localhost`) && !PathPrefix(`/api/v1`) && !PathPrefix(`/deployment`)
178177

179178
platform-service:
180179
image: unstract/platform-service:${VERSION}
@@ -311,7 +310,21 @@ services:
311310
container_name: unstract-worker-file-processing-v2
312311
restart: unless-stopped
313312
# command: ["file-processing"]
314-
command: [".venv/bin/celery", "-A", "worker", "worker", "--queues=file_processing,api_file_processing,file_processing_priority", "--loglevel=INFO", "--pool=prefork", "--concurrency=4", "--prefetch-multiplier=1", "--without-gossip", "--without-mingle", "--without-heartbeat"]
313+
command:
314+
[
315+
".venv/bin/celery",
316+
"-A",
317+
"worker",
318+
"worker",
319+
"--queues=file_processing,api_file_processing,file_processing_priority",
320+
"--loglevel=INFO",
321+
"--pool=prefork",
322+
"--concurrency=4",
323+
"--prefetch-multiplier=1",
324+
"--without-gossip",
325+
"--without-mingle",
326+
"--without-heartbeat",
327+
]
315328
ports:
316329
- "8087:8082"
317330
env_file:

docker/sample.proxy_overrides.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ http:
55
rule: Host(`frontend.unstract.localhost`)
66
backend:
77
service: backend
8-
rule: Host(`frontend.unstract.localhost`) && PathPrefix(`/api/v1`, `/deployment`)
8+
rule: Host(`frontend.unstract.localhost`) && (PathPrefix(`/api/v1`) || PathPrefix(`/deployment`))
99

1010
services:
1111
frontend:
1212
loadBalancer:
1313
servers:
14-
# Point to service running on docker host.
15-
- url: http://host.docker.internal:3000/
14+
# Point to service running on docker host.
15+
- url: http://host.docker.internal:3000/
1616
passHostHeader: true
1717
backend:
1818
loadBalancer:
1919
servers:
20-
# Point to service running on docker host.
21-
- url: http://host.docker.internal:8000/
20+
# Point to service running on docker host.
21+
- url: http://host.docker.internal:8000/
2222
passHostHeader: true

0 commit comments

Comments
 (0)