#*** If you have no existing database, comment the following the first-run path/to/data/directory:/var/lib/postgresql/data # Mount your data directory so your database may be persisted Usageīefore you use the sample file below, read about:įull list of environment variables \_/postgres/ for other possibilities This may cause issues when using automation tools, such as docker-compose, that start several containers simultaneously. While this is the expected behavior of postgres, this means that it will not accept incoming connections during that time. If there is no database when postgres starts in a container, then postgres will create the default database for you. This user will be able to connect without a password due to the presence of trust authentication for Unix socket connections made inside the container. It is recommended that any psql commands that are run inside of a *.sh script be executed as POSTGRES_USER by using the -username "$POSTGRES_USER" flag. Any *.sql files will be executed by POSTGRES_USER, which defaults to the postgres superuser. These initialization files will be executed in sorted name order as defined by the current locale, which defaults to en_US.utf8. After the entrypoint calls initdb to create the default postgres user and database, it will run any *.sql files and source any *.sh scripts found in that directory to do further initialization before starting the service. If you would like to do additional initialization in an image derived from this one, add one or more *.sql or *.sh scripts under /docker-entrypoint-initdb.d (creating the directory if necessary). The base image Dockerfile uses /docker-entrypoint.sh as ENTRYPOINT ALTER EXTENSION postgis UPDATE TO "2.5.1" ĪLTER EXTENSION postgis_topology UPDATE TO "2.5.1" ĪLTER EXTENSION postgis_tiger_geocoder UPDATE TO "2.5.1" ĭocker entrypoint and custom initialization
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |