Skip to content

Support INITDB arg#20

Open
half0wl wants to merge 1 commit into
mainfrom
rc/support-initdb-arg
Open

Support INITDB arg#20
half0wl wants to merge 1 commit into
mainfrom
rc/support-initdb-arg

Conversation

@half0wl

@half0wl half0wl commented Mar 16, 2025

Copy link
Copy Markdown

This adds an INITDB arg inside wrapper.sh to control whether we initialize the database (i.e. run /usr/local/bin/docker-entrypoint.sh)

If INITDB=false, it will sleep infinity instead of running the entrypoint.sh of base Postgres image. This lets us keep the container alive for railway ssh to work

This is for scenarios where we want to bootstrap the template on Railway with service configuration (env vars, tcp proxies, etc.) but we do not yet want the database to be initialized (e.g. spinning up replica instances where pgdata dir should not be initialized yet)

@remizreza

Copy link
Copy Markdown

merge

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit

@remizreza remizreza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@remizreza

Copy link
Copy Markdown

ok]

@marekdkropiewnicki-dotcom marekdkropiewnicki-dotcom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds an INITDB arg inside wrapper.sh to control whether we initialize the database (i.e. run /usr/local/bin/docker-entrypoint.sh)

If INITDB=false, it will sleep infinity instead of running the entrypoint.sh of base Postgres image. This lets us keep the container alive for railway ssh to work

This is for scenarios where we want to bootstrap the template on Railway with service configuration (env vars, tcp proxies, etc.) but we do not yet want the database to be initialized (e.g. spinning up replica instances where pgdata dir should not be initialized yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants