From bdb8f9bb647d7d828df96b8327b6c650e525d70b Mon Sep 17 00:00:00 2001 From: "theis.gaedigk" Date: Tue, 27 Jan 2026 10:49:59 +0100 Subject: [PATCH] updated conf --- auto-pull.sh | 6 ------ docker-compose.yml | 4 ---- frontend/nginx.conf | 8 ++++++++ frontend/src/utils/apiFunc.ts | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 auto-pull.sh diff --git a/auto-pull.sh b/auto-pull.sh deleted file mode 100644 index 7cc706f..0000000 --- a/auto-pull.sh +++ /dev/null @@ -1,6 +0,0 @@ - #!/bin/bash - cd /pfad/zu/deinem/repo - while true; do - git pull || echo "git pull failed" - sleep 10 - done diff --git a/docker-compose.yml b/docker-compose.yml index 27904f0..869f6e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,8 +4,6 @@ services: build: ./frontend networks: - proxynet - ports: - - "7002:80" restart: unless-stopped backend: @@ -13,8 +11,6 @@ services: build: ./backend networks: - proxynet - ports: - - "7001:7001" volumes: - ./backend:/bikelane-backend restart: unless-stopped diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 4aa4fa8..0a97c2d 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -9,6 +9,14 @@ server { try_files $uri $uri/ /index.html; } + location = /backend { + return 301 /backend/; + } + + location /backend/ { + proxy_pass http://weather-backend:7001/; + } + location ~* \.(?:js|mjs|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { expires 1y; access_log off; diff --git a/frontend/src/utils/apiFunc.ts b/frontend/src/utils/apiFunc.ts index 566d403..93f3f07 100644 --- a/frontend/src/utils/apiFunc.ts +++ b/frontend/src/utils/apiFunc.ts @@ -3,7 +3,7 @@ import { myToast } from "./toastify"; export const fetchWeather = async (city: string, units: string) => { try { const response = await fetch( - `https://backend.weather.the1s.de/api/fetchWeather?city=${encodeURIComponent( + `https://weather.the1s.de/backend/api/fetchWeather?city=${encodeURIComponent( city )}&units=${encodeURIComponent(units)}`, {