Open stephane-klein opened 1 year ago
It doesn't look like you have a functioning Postgresql database which is what it is waiting to verify..
It doesn't look like you have a functioning Postgresql database which is what it is waiting to verify..
Indeed:
discourse-db | ,---.
discourse-db | ,--------.,--. ,--. ,---. ,--. ,--------.| |
discourse-db | '--. .--'`--',--.--. ,---. ,-| | ,---. / .-' | | '--. .--'| .'
discourse-db | | | ,--.| .--'| .-. :' .-. | | .-. || `-, | | | | | |
discourse-db | | | | || | \ --.\ `-' | ' '-' '| .-' | |.--.| | `--'
discourse-db | `--' `--'`--' `----' `---' `---' `--' `--''--'`--' .--.
discourse-db | '--'
discourse-db | Image: tiredofit/postgres:15 | Version 15-3.0.2 Type 'image_changelog' for details
discourse-db | Repository/Issues/Support: https://github.com/tiredofit/docker-postgres/
discourse-db | Sponsor me for development and upkeep: https://www.tiredofit.ca/sponsor
discourse-db |
discourse-db | 2023-04-07.21:23:56 [NOTICE] ** [timezone] Timezone: Setting to 'America/Vancouver' from 'Etc/GMT'
discourse-db | 2023-04-07.14:23:56 [NOTICE] ** [monitoring] Container configured for monitoring with 'zabbix modern'
discourse-db | 2023-04-07.14:23:56 [NOTICE] ** [scheduling] Container configured for scheduled tasks with 'cron'
discourse-db | 2023-04-07.14:23:56 [ERROR] ** [postgres] No 'Superuser Password' Entered! - Set '$SUPERUSER_PASS'
discourse-db | **********************************************************************************************************************
discourse-db | **********************************************************************************************************************
discourse-db | **** ****
discourse-db | **** ERROR - Some initialization scripts haven't completed - All services are now halted ****
discourse-db | **** - The following scripts in '/etc/cont-init.d' did not pass their completion check ****
discourse-db | **** ****
discourse-db | **********************************************************************************************************************
discourse-db | **********************************************************************************************************************
discourse-db |
discourse-db | 10-postgres
discourse-db |
discourse-db |
discourse-db | **********************************************************************************************************************
discourse-db | **********************************************************************************************************************
discourse-db | **** ****
discourse-db | **** This could have happened for a variety of reasons. Please make sure you have followed the README ****
discourse-db | **** relating to this image and have proper configuration such as environment variables and volumes set ****
discourse-db | **** ****
discourse-db | **** If you feel that you have encountered a bug, please submit an issue on the revision control system ****
discourse-db | **** and provide full debug logs by setting the environment variable 'DEBUG_MODE=TRUE' ****
discourse-db | **** ****
discourse-db | **********************************************************************************************************************
discourse-db | **********************************************************************************************************************
discourse-db |
discourse-db | Image: tiredofit/postgres:15
discourse-db | Repository/Issues/Support: https://github.com/tiredofit/docker-postgres/
@tiredofit Fixed by:
❯ git diff
diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml
index 852c9fe..df9cd83 100644
--- a/examples/docker-compose.yml
+++ b/examples/docker-compose.yml
@@ -45,6 +45,7 @@ services:
- POSTGRES_DB=discourse
- POSTGRES_USER=discourse
- POSTGRES_PASSWORD=password
+ - SUPERUSER_PASS=superuser
networks:
- services
If it helps, I solved by adding the - SUPERUSER_PASS=superuser
like @stephane-klein
Also by using the official Postgres image and exposing the PG port. Without that, PG is not reachable.
discourse-db:
container_name: discourse-db
image: postgres:15
restart: unless-stopped
volumes:
- ./db:/var/lib/postgresql/data
environment:
- TIMEZONE=Europe/Paris
- CONTAINER_NAME=discourse-db
- POSTGRES_DB=discourse
- POSTGRES_USER=discourse
- POSTGRES_PASSWORD=password
- SUPERUSER_PASS=superuser
networks:
- services
expose:
- 5432
I have executed:
I see:
And:
Where is my mistake? How can I fix it?