ecos-postgresql-app
Purpose:
Image built on the official postgresql 9.4.x image with an added database and user initialization script
Tags:
Base images:
postgres:9.4-alpine - official postgresql 9.4.x image based on alpine linux
Docker Compose service template:
ecos-postgresql:
container_name: ecos-postgresql
restart: unless-stopped
ports:
- 127.0.0.1:50432:5432/tcp
environment:
- POSTGRES_PASSWORD=alfr3sc0
- DB_NAME=alfresco
- FLOWABLE_DBNAME=alf_flowable
- HISTORY_DBNAME=history_service
- CASE_MODEL_DBNAME=alfresco_case_model
hostname: ecos-postgresql
image: nexus.citeck.ru/ecos-postgres:9.4-alpine
stop_grace_period: 1m
volumes:
- /opt/alfresco/postgresql/:/var/lib/postgresql/data
networks:
- app_network
Used variables:
POSTGRES_PASSWORD - mandatory parameter except for
POSTGRES_HOST_AUTH_METHOD=trust, root user password
POSTGRES_USER - override of the default postgres user
POSTGRES_DB - override of the default database
POSTGRES_INITDB_ARGS - additional parameters for cluster initialization
POSTGRES_INITDB_WALDIR - override of the default transaction log storage directory
POSTGRES_HOST_AUTH_METHOD - authentication method for host connections for all databases, users, and addresses in pg_hba.conf. Default value md5
PGDATA - override of the default file storage directory of the initialized cluster
DB_NAME - definition of the ecos database
DB_USERNAME - definition of the user for the ecos/flowable/ecos-history database
DB_PASSWORD - password of the user being created
FLOWABLE_DBNAME - definition of the flowable database
HISTORY_DBNAME - definition of the database for ecos-history-app (deprecated parameter, microservice databases are moved to a separate instance)
CASE_MODEL_DBNAME - definition of the ecos-case-model-app database
Typical settings acceptance log output:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... sh: locale: not found
ok
No usable system locales were found.
Use the option "--debug" to see details.
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
postgres -D /var/lib/postgresql/data
or
pg_ctl -D /var/lib/postgresql/data -l logfile start
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
WARNING: No password has been set for the database.
This will allow anyone with access to the
Postgres port to access your database. In
Docker's default configuration, this is
effectively any other container on the same
system.
Use "-e POSTGRES_PASSWORD=password" to set
it in "docker run".
waiting for server to start....LOG: database system was shut down at 2020-04-27 23:16:37 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
done
server started
/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/initDBs.sh
CREATE ROLE
CREATE DATABASE
CREATE DATABASE
CREATE DATABASE
CREATE DATABASE
CREATE EXTENSION
CREATE EXTENSION
waiting for server to shut down....LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
LOG: database system was shut down at 2020-04-27 23:16:40 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started