build: add Fly.io deployment (nginx static serving)
- Dockerfile: serve the static PWA via nginx:alpine on port 8080 - deploy/nginx.conf: mirror .htaccess (jsx/mjs MIME, no-cache for shell/sw/manifest/meta/dist, long-immutable cache for assets, security headers, SPA fallback) - fly.toml: internal_port 8080, force_https, scale-to-zero - .dockerignore: exclude .git/node_modules/tests from the image
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
# SecureBit.chat is a static PWA (no backend). The committed build artifacts in
|
||||
# dist/ are served as-is by nginx — matching the project's release workflow,
|
||||
# where dist/ is rebuilt and committed for every release.
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
# Replace the default nginx config with our static-serving config.
|
||||
COPY deploy/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Serve the repository (src/, assets/, libs/, dist/, config/, logo/, sw.js, ...).
|
||||
COPY . /usr/share/nginx/html
|
||||
|
||||
# Fly.io health checks and routing target this port.
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user