ADD: Dockerize
This commit is contained in:
parent
b6c0c50968
commit
9b58aaaa0b
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Stage 1: Build
|
||||||
|
FROM node:26-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build -- --configuration production
|
||||||
|
|
||||||
|
# Stage 2: Serve
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY --from=build /app/dist/WetterHub/browser /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 80
|
||||||
9
nginx.conf
Normal file
9
nginx.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@ import {Configuration} from './api';
|
|||||||
|
|
||||||
export function apiConfigFactory() {
|
export function apiConfigFactory() {
|
||||||
return new Configuration({
|
return new Configuration({
|
||||||
basePath: 'http://localhost:8000'
|
basePath: `${window.location.protocol}//${window.location.hostname}:8000`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user