You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite inlines VITE_* variables from .env* files into the public bundle. .dockerignore excludes no .env* files, .gitignore has no .env entry, and .env.production is committed. .dockerignore also has an inline comment (dist # Or your build directory), which .dockerignore doesn't support, so dist isn't ignored.
What?
Exclude .env* (except the committed, non-secret ones that are meant to be used) in .dockerignore, and .env.local/.env.*.local in .gitignore.
Check that .env.production holds no secret (only VITE_HOST_URI is read).
Fix the dist line.
Acceptance criteria
Local .env* files can't end up in the image or the bundle by accident.
Activity
fix: allow only the top-level .env.example
fix: keep local env files out of builds (#68)