fix(inference/traeffik): Refactor traeffik to be outside of models and add sd
This commit is contained in:
parent
b34fa91dc4
commit
d97f3c759b
25
jan-inference/docker-compose.yml
Normal file
25
jan-inference/docker-compose.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# Service for Traefik, a modern HTTP reverse proxy and load balancer.
|
||||||
|
traefik:
|
||||||
|
image: traefik:v2.10
|
||||||
|
ports:
|
||||||
|
# Map port 80 in the container to port 80 on the host.
|
||||||
|
- "80:80"
|
||||||
|
# Map port 8080 in the container (Traefik's dashboard) to port 8080 on the host.
|
||||||
|
- "8080:8080"
|
||||||
|
# Mount the Docker socket to allow Traefik to listen to Docker's API.
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- ./traefik/traefik.yml:/traefik.yml:ro
|
||||||
|
- ./traefik/config.yml:/config.yml:ro
|
||||||
|
# Connect this service to the traefik_public network.
|
||||||
|
networks:
|
||||||
|
- traefik_public
|
||||||
|
|
||||||
|
# Define networks used in this docker-compose file.
|
||||||
|
networks:
|
||||||
|
# Public-facing network that Traefik uses. Marked as external to indicate it may be defined outside this file.
|
||||||
|
traefik_public:
|
||||||
|
external: true
|
||||||
@ -1,23 +0,0 @@
|
|||||||
http:
|
|
||||||
#region routers
|
|
||||||
routers:
|
|
||||||
llm:
|
|
||||||
entryPoints:
|
|
||||||
- "web"
|
|
||||||
rule: "PathPrefix(`/inference/llm`)"
|
|
||||||
middlewares:
|
|
||||||
- llmm-strip-prefix
|
|
||||||
service: llm
|
|
||||||
#endregion
|
|
||||||
#region services
|
|
||||||
services:
|
|
||||||
llm:
|
|
||||||
loadBalancer:
|
|
||||||
servers:
|
|
||||||
- url: "http://llm:8000"
|
|
||||||
#endregion
|
|
||||||
middlewares:
|
|
||||||
llmm-strip-prefix:
|
|
||||||
stripPrefix:
|
|
||||||
prefixes:
|
|
||||||
- "/inference/llm"
|
|
||||||
38
jan-inference/traefik/config.yml
Normal file
38
jan-inference/traefik/config.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
http:
|
||||||
|
#region routers
|
||||||
|
routers:
|
||||||
|
llm:
|
||||||
|
entryPoints:
|
||||||
|
- "web"
|
||||||
|
rule: "PathPrefix(`/inference/llm/`)"
|
||||||
|
middlewares:
|
||||||
|
- llmm-strip-prefix
|
||||||
|
service: llm
|
||||||
|
sd:
|
||||||
|
entryPoints:
|
||||||
|
- "web"
|
||||||
|
rule: "PathPrefix(`/inference/sd/`)"
|
||||||
|
middlewares:
|
||||||
|
- sd-strip-prefix
|
||||||
|
service: sd
|
||||||
|
#endregion
|
||||||
|
#region services
|
||||||
|
services:
|
||||||
|
llm:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: "http://llm:8000"
|
||||||
|
sd:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: "http://sd:8000"
|
||||||
|
#endregion
|
||||||
|
middlewares:
|
||||||
|
llm-strip-prefix:
|
||||||
|
stripPrefix:
|
||||||
|
prefixes:
|
||||||
|
- "/inference/llm/"
|
||||||
|
sd-strip-prefix:
|
||||||
|
stripPrefix:
|
||||||
|
prefixes:
|
||||||
|
- "/inference/sd/"
|
||||||
Loading…
x
Reference in New Issue
Block a user