Skip to content

Change local docker-compose setup #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2025

Conversation

andrew-farries
Copy link
Collaborator

@andrew-farries andrew-farries commented May 12, 2025

Make a couple of changes to the local docker-compose setup:

Run local the postgres container as user postgres:

So that the healthcheck can run as the `postgres` user and not add a
connection failure error to the Postgres log when the health check
attempts to connect as the `root` user.

Edit healthcheck settings to avoid repeated health checks after the container has started:

Set a `start_period` and a `start_interval` to ensure that the
healthcheck quickly notices that Postgres is ready after startup.

Thereafter, set the `interval` to 24h because we don't care about ongoing
healthchecks in the local dev environment.

@github-actions github-actions bot temporarily deployed to Docs Preview May 12, 2025 08:13 Inactive
@andrew-farries andrew-farries force-pushed the run-local-postgres-as-postgres-user branch from 2ae2bbe to ab2259f Compare May 12, 2025 08:14
@github-actions github-actions bot temporarily deployed to Docs Preview May 12, 2025 08:14 Inactive
So that the healthcheck can run as the `postgres` user and not spam the
Postgres logs with connection failure errors when the health check
attempts to connect as the `root` user.
Set a `start_period` and a `start_interval` to ensure that the
healthcheck quickly notices that Postgres is ready after startup.

Thereafter, set the `interval` to 24h because we don't care about ongoing
healthchecks in the local dev environment.
@andrew-farries andrew-farries force-pushed the run-local-postgres-as-postgres-user branch from ab2259f to 0fa92a4 Compare May 12, 2025 08:14
@github-actions github-actions bot temporarily deployed to Docs Preview May 12, 2025 08:15 Inactive
@andrew-farries andrew-farries marked this pull request as ready for review May 12, 2025 08:17
@andrew-farries andrew-farries requested a review from kvch May 12, 2025 08:17
@andrew-farries andrew-farries merged commit d4f007b into main May 12, 2025
30 checks passed
@andrew-farries andrew-farries deleted the run-local-postgres-as-postgres-user branch May 12, 2025 09:55
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.

2 participants