Lightweight static file server with Nginx, optimized for SPAs
802
Lightweight static file server with Nginx, optimized for SPAs and static sites.
docker run -p 80:80 -v $(pwd)/dist:/usr/share/nginx/html ogulcanaydogan/static-server
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 80 |
SPA_MODE | Enable SPA routing (fallback to index.html) | true |
GZIP | Enable gzip compression | true |
FROM node:20-alpine AS build
WORKDIR /app
COPY . .
RUN npm ci && npm run build
FROM ogulcanaydogan/static-server
COPY --from=build /app/dist /usr/share/nginx/html
MIT
Content type
Image
Digest
sha256:2213a3529…
Size
26 MB
Last updated
7 months ago
docker pull ogulcanaydogan/static-server