fix vite url and proxy_pass url
This commit is contained in:
9
.env.example
Normal file
9
.env.example
Normal file
@@ -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
|
||||||
@@ -8,7 +8,7 @@ RUN npm install
|
|||||||
|
|
||||||
COPY . .
|
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
|
ENV VUE_APP_API_URL=$VUE_APP_API_URL
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
@@ -26,13 +26,15 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# API proxy - strip /api prefix and send to backend
|
# 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/ {
|
location /api/ {
|
||||||
# Remove /api prefix when proxying
|
# Remove /api prefix when proxying
|
||||||
rewrite ^/api/(.*)$ /$1 break;
|
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_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-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|||||||
Reference in New Issue
Block a user