fix(backend): fixed cors error on build dev environment
This commit is contained in:
parent
1b86042c57
commit
61ac416ad5
2 changed files with 6 additions and 2 deletions
|
|
@ -19,6 +19,10 @@ RUN npm ci --prefer-offline
|
|||
COPY eeg_frontend/openapi.yaml ./
|
||||
RUN npx openapi-generator-cli generate -i ./openapi.yaml -g typescript-angular -o ./src/app/api
|
||||
|
||||
ARG VITE_OR_ANGULAR_BACKEND_URL
|
||||
ENV BACKEND_URL=$VITE_OR_ANGULAR_BACKEND_URL
|
||||
RUN sed -i "s|https://API_URL_PLACEHOLDER|${BACKEND_URL}|g" src/environments/environment.staging.ts
|
||||
|
||||
COPY eeg_frontend/ ./
|
||||
RUN npm run build -- --configuration staging
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'https://preview.coolify.mueller-dev.com'
|
||||
production: true,
|
||||
apiUrl: 'https://API_URL_PLACEHOLDER'
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue