init
This commit is contained in:
22
.dockerignore
Normal file
22
.dockerignore
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
node_modules/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
dist/
|
||||
.angular/
|
||||
.vscode/
|
||||
.idea/
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
README.md
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# ----- Stage 1: Build der Angular-Anwendung -----
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
|
||||
RUN npm run build -- --configuration production
|
||||
|
||||
# ----- Stage 2: Serven der Anwendung mit Nginx -----
|
||||
FROM nginx:stable-alpine
|
||||
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
|
||||
COPY --from=build /app/dist/frontend /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user