Commit cc69ca90 authored by Kantz's avatar Kantz
Browse files

proxy pass für nginx in env ausgelagert

parent 0cfc4595
...@@ -31,6 +31,8 @@ services: ...@@ -31,6 +31,8 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
VITE_API_BASE_URL: http://backend-openai:8000 VITE_API_BASE_URL: http://backend-openai:8000
env_file:
- ../frontend/.env
depends_on: depends_on:
backend-openai: backend-openai:
condition: service_healthy condition: service_healthy
......
VITE_FRONTEND_LANG="de" VITE_FRONTEND_LANG="de"
VITE_SHOW_ARCHIVED_CHATS_BUTTON="true" VITE_SHOW_ARCHIVED_CHATS_BUTTON="true"
BACKEND_PROXY_PASS="http://backend-openai:8000"
\ No newline at end of file
...@@ -14,4 +14,4 @@ RUN pnpm run build ...@@ -14,4 +14,4 @@ RUN pnpm run build
FROM nginx:1.27-alpine FROM nginx:1.27-alpine
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/templates/default.conf.template
...@@ -8,7 +8,7 @@ server { ...@@ -8,7 +8,7 @@ server {
index index.html; index index.html;
location /api/ { location /api/ {
proxy_pass http://backend-openai:8000; proxy_pass ${BACKEND_PROXY_PASS};
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
......
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