feat: Configure VITE_API_URL during build via Gitea workflow and Dockerfile, removing local fallback.
Build & Push Hospitality / build-and-push (push) Successful in 3m41s

This commit is contained in:
steinhelge
2025-11-25 19:22:56 +01:00
parent a298159ce2
commit bd64eea849
3 changed files with 11 additions and 1 deletions
+3
View File
@@ -9,6 +9,9 @@ RUN npm ci
# Kopier resten av koden
COPY . .
ARG VITE_API_URL
ENV VITE_API_URL=$VITE_API_URL
# Bygg for produksjon
RUN npm run build
+1 -1
View File
@@ -1,7 +1,7 @@
import axios from 'axios';
import type { LoginRequest, LoginResponse, UserInfo } from '../types/auth';
const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:5163/api';
const API_BASE_URL = import.meta.env.VITE_API_URL;
export const api = axios.create({
baseURL: API_BASE_URL,