Sign inSign up

whoisphvl/votesecure

By whoisphvl

•Updated about 5 hours ago

VoteSecure: a React/Vite voting app, multi-stage build, served by hardened nginx (~96 MB).

Image
Security
0

80

whoisphvl/votesecure repository overview

⁠VoteSecure

A containerized build of the VoteSecure online voting web app (React, Vite, TypeScript, Supabase).

⁠Quick start

docker pull whoisphvl/votesecure:1.2
docker run -d --name votesecure -p 8080:80 whoisphvl/votesecure:1.2

Then open http://localhost:8080⁠

⁠How it's built

  • Multi-stage Dockerfile: Node 22 (alpine) installs dependencies and builds the app, then only the finished dist files are copied into nginx:alpine. No Node, node_modules or build tools in the final image.
  • Hardened nginx config: server_tokens off, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, and a React fallback so refreshing on a route like /vote serves the app instead of a 404.
  • Small: about 96 MB on disk.
  • No secrets in the image: .env, .git and node_modules are excluded with .dockerignore.

⁠Notes

  • The container listens on port 80 over plain HTTP. For HTTPS, put it behind a reverse proxy or load balancer.
  • The app talks to a Supabase backend from the browser, so it needs internet access.

⁠Tags

  • 1.2: hardened nginx config, VoteSecure page title.

⁠Source

https://github.com/Phvl-0/Online-Election-System⁠ (branch docker-multistage)

Tag summary

Content type

Image

Digest

sha256:831dfa717…

Size

26.7 MB

Last updated

about 5 hours ago

docker pull whoisphvl/votesecure:1.3