diff --git a/README.md b/README.md index cc8d389..d1d0351 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ - [Creating User and Database at Launch](creating-user-and-database-at-launch) - [Configuration](#configuration) - [Data Store](#data-store) - - [Securing the server](#securing-the-server) - [Shell Access](#shell-access) - [Upgrading](#upgrading) @@ -84,30 +83,6 @@ docker run -it --rm --volumes-from=postgresql \ sameersbn/postgresql:9.4 sudo -u postgres -H psql ``` -Alternately you can fetch the password set for the `postgres` user from the container logs. - -```bash -docker logs postgresql -``` - -In the output you will notice the following lines with the password: - -```bash -|------------------------------------------------------------------| -| PostgreSQL User: postgres, Password: xxxxxxxxxxxxxx | -| | -| To remove the PostgreSQL login credentials from the logs, please | -| make a note of password and then delete the file pwfile | -| from the data store. | -|------------------------------------------------------------------| -``` - -To test if the postgresql server is working properly, try connecting to the server. - -```bash -psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} postgresql) -``` - # Creating User and Database at Launch The image allows you to create a user and database at launch time. @@ -200,24 +175,6 @@ docker run --name postgresql -d \ sameersbn/postgresql:9.4 ``` -## Securing the server - -By default a randomly generated password is assigned for the postgres user. The password is stored in a file named `pwfile` in the data store and is printed in the logs. - -If you dont want this password to be displayed in the logs, then please note down the password listed in `/opt/postgresql/data/pwfile` and then delete the file. - -```bash -cat /opt/postgresql/data/pwfile -rm /opt/postgresql/data/pwfile -``` - -Alternately, you can change the password of the postgres user - -```bash -psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} postgresql) -\password postgres -``` - # Shell Access For debugging and maintenance purposes you may want access the containers shell. If you are using docker version `1.3.0` or higher you can access a running containers shell using `docker exec` command.