Add Dockerfile, nginx config and publish CI

Add a multi-stage Dockerfile to build the React app (node:24-alpine, npm ci, npm run build) and serve the compiled /app/dist via nginx:alpine. Include nginx.conf that routes unknown paths to /index.html so React Router works in a SPA. Add a CI workflow (.forgejo/workflows/docker-publish.yml) to build and push the Docker image to Codeberg Container Registry on pushes to main (requires CODEBERG_TOKEN repository secret and tags the image as codeberg.org/${{ github.repository }}:latest).
This commit is contained in:
lobo committed 2026-03-28 10:10:09 +01:00
1 parent d9c3f40c4a
commit 490fa2fa93
3 files changed
+52

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# Redirect all unknown paths to index.html to allow React Router to handle the routing
try_files $uri $uri/ /index.html;
}
}