Files
ToBePlayed-Frontend/nginx.conf
T
lobo 490fa2fa93 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).
2026-03-28 10:10:09 +01:00

10 lines
261 B
Nginx Configuration File

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;
}
}