feat(docker): upgrade runtime to Node 22 and add postgres support#30
Open
baozhoutao wants to merge 1 commit into
Open
feat(docker): upgrade runtime to Node 22 and add postgres support#30baozhoutao wants to merge 1 commit into
baozhoutao wants to merge 1 commit into
Conversation
- Bump Dockerfile NODE_VERSION 20 -> 22 - Add pg driver dependency to @objectos/server so the postgres datasource works out of the box (pg is an optional peer of @objectstack/driver-sql) - Pass OS_SECRET_KEY / OS_AUTH_SECRET / OS_CORS_ORIGIN through in docker-compose so production boots (LocalCryptoProvider requires a stable secret) and CSRF trusted origins can be configured
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.
What
Hardens the
docker/runtime so it boots cleanly against a PostgreSQL business DB.docker/Dockerfile(builder + runtime base image).pgdependency to@objectos/server.pgis an optional peer of@objectstack/driver-sql; without it the SQL datasource can't connect to postgres. Adding it makesOS_BUSINESS_DB_URL=postgres://…work out of the box.docker/docker-compose.yml:OS_SECRET_KEY/OS_AUTH_SECRET— required forNODE_ENV=productionboot (LocalCryptoProviderrefuses to start without a stable secret).OS_CORS_ORIGIN— lets the deployer configure better-auth trusted origins (avoidsInvalid originon login/register when accessed via a non-default host/port).Why
Verified locally: container boots healthy on Node 22 against a PostgreSQL DB, system tables + app tables provision correctly, Console login/register works once
OS_CORS_ORIGINmatches the access URL.Notes
Local-only network workarounds (Alpine mirror swap, corepack-bypass command override) were intentionally kept out of this PR.