build-deploy workflow hinzugefügt.
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 2m3s

This commit is contained in:
2025-12-30 15:01:31 +01:00
parent 9f1e8d7051
commit e9a5db619b
6 changed files with 58 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
name: Angular Build & Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Build and Run
run: |
# Startet den Build-Prozess auf deinem Server
docker compose up -d --build

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM node:20 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build -- --configuration=production
FROM nginx:alpine
COPY --from=build /app/dist/OMDSAngularWebClient/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

0
LICENSE Normal file
View File

View File

@@ -34,8 +34,8 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "500kB", "maximumWarning": "3MB",
"maximumError": "1MB" "maximumError": "10MB"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",

7
docker-compose.yaml Normal file
View File

@@ -0,0 +1,7 @@
services:
angular-client:
build: .
container_name: omds-angular-webclient
ports:
- "9091:80"
restart: always

16
nginx.conf Normal file
View File

@@ -0,0 +1,16 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}