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
Build & Push Hospitality / build-and-push (push) Successful in 3m41s
This commit is contained in:
@@ -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,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,
|
||||
|
||||
Reference in New Issue
Block a user