Add Dockerfile, docker-compose.yml and Gitea Actions workflow for CI/CD

This commit is contained in:
DanielS
2026-06-30 23:19:39 +02:00
parent 79745eb127
commit 54fefadda9
3 changed files with 61 additions and 0 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
# Build-Phase
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
RUN npm run build
# Production-Phase
FROM nginx:alpine
# Nginx konfigurieren für non-root Port 8080
RUN sed -i 's/listen\( \)*80;/listen 8080;/g' /etc/nginx/conf.d/default.conf && \
touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid /var/cache/nginx /var/log/nginx /etc/nginx/conf.d
USER nginx
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 8080