Prepare Docker Compose VPS deployment#25
Open
Spbd1 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
package.json(Node 22) and the Docker image and make the container build reproducible and production-safe..env.Description
Dockerfileto usenode:22-alpine, install dependencies reproducibly withnpm ciwhenpackage-lock.jsonexists, runnpm run db:generatebeforenpm run build, add a build-time arg/ENV forNEXT_PUBLIC_ENABLE_SERVER_SUBMISSION, and set runtime production envs (NODE_ENV=production,NEXT_TELEMETRY_DISABLED=1,HOSTNAME=0.0.0.0,PORT=3000).docker-compose.ymlto pass the documented env vars (GOOGLE_SHEETS_WEBHOOK_URL,GOOGLE_SHEETS_WEBHOOK_SECRET,APP_BASE_URL,ENABLE_SERVER_SUBMISSION,NEXT_PUBLIC_ENABLE_SERVER_SUBMISSION,ADMIN_EXPORT_TOKEN,SUBMISSION_RATE_LIMIT_WINDOW_MS,SUBMISSION_RATE_LIMIT_MAX,MAX_SUBMISSION_BODY_BYTES,CONSENT_VERSION,SCHEMA_VERSION), add a build-time arg forNEXT_PUBLIC_ENABLE_SERVER_SUBMISSION, remove the obsoleteADMIN_DASHBOARD_PASSWORDentry, and bind the app to127.0.0.1:3000while keeping Postgres private (no host ports) with clarifying comments for VPS usage..dockerignoreto exclude build/context noise and local Docker artifacts (.docker/,docker-data/,docker-compose.override.yml,*.tar) in addition to existing ignores likenode_modules,.next,.env,exports,.git, and logs.Dockerfile,docker-compose.yml,.dockerignore.Testing
npm run typecheckand it completed successfully.npm run lintand it completed successfully with an existing React hook dependency warning reported (did not block the run).npm run buildand the Next.js production build completed successfully (static pages generated; build-time flag note applies).docker compose buildanddocker compose configbut they could not be executed in this environment because the Docker CLI is not available (commands failed withdocker: command not found).Codex Task