Add Docker Compose deployment, security headers, and VPS docs#13
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
Description
Dockerfileusing Node 20 that generates the Prisma client, builds the Next app, exposes port3000, and starts the app withnpm run start.docker-compose.ymlwithappand privatepostgresservices, a persistentpostgres_datavolume, local-safe environment defaults, andportsbound to127.0.0.1:3000:3000so Postgres is not exposed by default..env.examplewith Docker-friendly Postgres defaults and placeholder secrets and add a.dockerignoreto keep sensitive/build files out of the image context.next.config.mjs(X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and Content-Security-Policy), with CSP relaxed for development only.docs/DEPLOYMENT.md, including the explicit migration commanddocker compose exec app npm run db:migrateand guidance to run migrations manually so data is not lost.docs/DATA_COLLECTION.mddescribing how submissions flow from participants toPOST /api/submissions, how to confirm and export data (CSV/JSON), completeness flags, and safe deletion procedures.docs/RESEARCH_NOTES.mdwith concise study motivation, manipulation details, measures, computed metrics, ethics/limitations, and recommended pilot steps.Testing
git diff --checkpassed successfully.node -e "import('./next.config.mjs').then((m) => m.default.headers().then((h) => console.log(h[0].headers.length)))"executed successfully to validate header configuration.docker-compose.ymlYAML parsing was validated (rubyYAML load returned OK).npm installfailed due to registry access:403 Forbiddenwhen attempting to fetch@prisma/client, so TypeScript typecheck (npm run typecheck) andnext-based lint/build (npm run lint,npm run build) could not complete and were blocked.docker compose config/docker compose buildcould not be run in this environment because Docker is not available, so Compose start was not executed here; the Compose file is written to supportdocker compose up --buildin a Docker-enabled VPS environment.Codex Task