Skip to content

Fix password #313

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 8 commits into from
Jun 27, 2021
Merged

Fix password #313

merged 8 commits into from
Jun 27, 2021

Conversation

NyakudyaA
Copy link
Collaborator

@NyakudyaA NyakudyaA commented Jun 12, 2021

  • Generate random password for the role superuser and replication when env variable is not set
  • Password is visible in the logs and as a text file within the container
  • Adjusted scenario test to explicitly require the password
  • Added kartoza figlet to the image to advertise the image
  • Added env POSTGRES_INITDB_WALDIR which allows wal files to be stored outside data dir as per https://github.com/docker-library/postgres/blob/master/13/alpine/docker-entrypoint.sh#L48

@NyakudyaA NyakudyaA requested a review from lucernae June 12, 2021 14:10
Copy link
Contributor

@lucernae lucernae left a comment

Choose a reason for hiding this comment

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

LGTM, it seems there only slight refactoring changes.

@@ -3,6 +3,7 @@ POSTGRES_MAJOR_VERSION=$(cat /tmp/pg_version.txt)
POSTGIS_MAJOR=$(cat /tmp/pg_major_version.txt)
POSTGIS_MINOR_RELEASE=$(cat /tmp/pg_minor_version.txt)
DEFAULT_DATADIR="/var/lib/postgresql/${POSTGRES_MAJOR_VERSION}/main"
POSTGRES_INITDB_WALDIR="/opt/postgresql/${POSTGRES_MAJOR_VERSION}/pg_waldir"
Copy link
Contributor

Choose a reason for hiding this comment

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

So, to reconfirm, POSTGRES_INITDB_WALDIR uses /opt/postgresql directory while DEFAULT_DATADIR uses /var/lib/postgresql ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I can change the location from /opt/postgresql to another location if you feel so. The idea is to be able to mount the two in different folders as done in Postgres official images

README.md Outdated
@@ -306,6 +306,10 @@ To create a running container do:
docker run --name "postgis" -p 25432:5432 -d -t kartoza/postgis
```

**NB** If you do not pass the env variable `POSTGRES_PASS` a random password
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace NB with Note (many people are unfamiliar with the term notae benae)

@NyakudyaA NyakudyaA merged commit 62ace3d into develop Jun 27, 2021
@NyakudyaA NyakudyaA deleted the fix-password branch June 28, 2021 15:27
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.

3 participants