fractal-analytics-platform / fractal-containers

Containers for testing Fractal
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Change PostgreSQL port #2

Closed aangelone2 closed 11 months ago

aangelone2 commented 11 months ago

We wish to set the PostgreSQL port to 5433. The

command: -p 5432

directive in the docker.compose file changes the port the PostgreSQL container is listening on in the container (the port directive only changes the exposed port to the host, and not the one the container will communicate with on the docker-compose network).

However, this setting causes a conflict with the healthcheck directive, which is necessary to avoid the server crashing the first time the container ensemble is started (due to PostgreSQL starting, stopping, and restarting again after the DB is initialized; from the second time on initialization is skipped, and the healthcheck is not necessary).

After this is fixed, one should set POSTGRESQL_PORT=5433 directive in fractal_server.env.

tcompa commented 11 months ago

Note: the reason for switching to 5433 is to avoid conflicts with the active postgres service on the host machine. I don't know if there are better ways to achieve this goal.

Any suggestion from @mfranzon would be welcome :)