Commit 9f517a34 authored by Kantz's avatar Kantz
Browse files

vm11 als ollama backen hinzugefügt

parent 440fea15
services: services:
backend: backend-openai:
build: build:
context: ../backend context: ../backend
dockerfile: Dockerfile dockerfile: Dockerfile
...@@ -21,16 +21,56 @@ services: ...@@ -21,16 +21,56 @@ services:
start_period: 120s start_period: 120s
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./logs:/app/logs - ./logs/openai:/app/logs
networks: networks:
- web - web
frontend: backend-ollama:
build:
context: ../backend
dockerfile: Dockerfile
env_file:
- ../backend/.env-ollama
expose:
- "8000"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health/ready')",
]
interval: 5s
timeout: 3s
retries: 10
start_period: 120s
restart: unless-stopped
volumes:
- ./logs/ollama:/app/logs
networks:
- web
frontend-openai:
build:
context: ../frontend
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: http://backend-openai:8000
depends_on:
- backend-openai
restart: unless-stopped
networks:
- web
frontend-ollama:
build: build:
context: ../frontend context: ../frontend
dockerfile: Dockerfile dockerfile: Dockerfile
args:
VITE_API_BASE_URL: http://backend-ollama:8000
depends_on: depends_on:
- backend - backend-ollama
restart: unless-stopped restart: unless-stopped
networks: networks:
- web - web
......
FROM node:22-alpine AS build FROM node:22-alpine AS build
ARG VITE_API_BASE_URL
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
WORKDIR /app WORKDIR /app
RUN corepack enable RUN corepack enable
......
...@@ -13,10 +13,9 @@ export default defineConfig({ ...@@ -13,10 +13,9 @@ export default defineConfig({
server: { server: {
host: "0.0.0.0", host: "0.0.0.0",
port: 5173, port: 5173,
allowedHosts: ["vm11.fkc.hft-stuttgart.de"],
proxy: { proxy: {
"/api": { "/api": {
target: process.env.VITE_PROXY_TARGET || "http://localhost:8000", target: process.env.VITE_API_BASE_URL || "http://localhost:8000",
changeOrigin: true, changeOrigin: true,
}, },
}, },
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment