Fix CHARTERED_WEB_URL environment variable so it's picked up by Vite
Diff
chartered-frontend/Dockerfile | 4 +++-
chartered-frontend/README.md | 2 +-
chartered-frontend/src/stores/auth.ts | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
@@ -1,6 +1,6 @@
FROM node AS builder
ARG CHARTERED_WEB_URL
RUN ["/bin/bash", "-c", ": ${CHARTERED_WEB_URL:?CHARTERED_WEB_URL must be set to the public URL that chartered-web can be reached by passing --build-arg to docker build.}"]
ARG VITE_CHARTERED_WEB_URL
RUN ["/bin/bash", "-c", ": ${VITE_CHARTERED_WEB_URL:?VITE_CHARTERED_WEB_URL must be set to the public URL that chartered-web can be reached by passing --build-arg to docker build.}"]
WORKDIR /app
COPY . /app
RUN npm install -D && npm run build
@@ -19,5 +19,5 @@
To create a production version of chartered-frontend:
```bash
docker build . --build-arg CHARTERED_WEB_URL=http://127.0.0.1:3000
docker build . --build-arg VITE_CHARTERED_WEB_URL=http://127.0.0.1:3000
```
@@ -5,7 +5,7 @@
/**
* The base URL of the chartered-web instance
*/
export const BASE_URL = import.meta.env.CHARTERED_WEB_URL || 'http://127.0.0.1:8888';
export const BASE_URL = import.meta.env.VITE_CHARTERED_WEB_URL || 'http://127.0.0.1:8888';
/**
* Key in localStorage to store authentication information in