From 7d38e2bce2818b1054a0bec83a7921d47d14e386 Mon Sep 17 00:00:00 2001 From: Cipher Vance Date: Sun, 25 Jan 2026 09:48:06 -0600 Subject: [PATCH] fix vite url and proxy_pass url --- .env.example | 9 +++++++++ docker/Dockerfile | 2 +- docker/nginx.conf | 8 +++++--- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4c7063a --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +# RideAware UI Environment Configuration + +# API URL - Set this to override the default +# Development default: http://127.0.0.1:5010 +# Production default: https://dev-api.rideaware.org +VUE_APP_API_URL=http://127.0.0.1:5010 + +# Trainer App URL +VUE_APP_TRAINER_URL=http://localhost:5173 diff --git a/docker/Dockerfile b/docker/Dockerfile index 43c78bb..d410013 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ RUN npm install COPY . . -ARG VUE_APP_API_URL=https://dev-api.rideaware.org +ARG VUE_APP_API_URL=http://127.0.0.1:5010 ENV VUE_APP_API_URL=$VUE_APP_API_URL RUN npm run build diff --git a/docker/nginx.conf b/docker/nginx.conf index f7d2461..4c53072 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -26,13 +26,15 @@ server { } # API proxy - strip /api prefix and send to backend + # For local dev, use: http://host.docker.internal:5010 (Mac/Windows) or http://172.17.0.1:5010 (Linux) + # For production, use: https://api.rideaware.org location /api/ { # Remove /api prefix when proxying rewrite ^/api/(.*)$ /$1 break; - - proxy_pass https://dev-api.rideaware.org; + + proxy_pass http://172.17.0.1:5010; proxy_http_version 1.1; - proxy_set_header Host dev-api.rideaware.org; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;