build(docker/database): work on postgres config
This commit is contained in:
parent
ecb085ad10
commit
cf76752894
@ -3,6 +3,9 @@ FROM docker.io/postgres:12
|
||||
# Allow for connecting to database without password authentication
|
||||
ENV POSTGRES_HOST_AUTH_METHOD=trust
|
||||
|
||||
RUN cp /mnt/fradrive/docker/database/pg_hba.conf /docker-entrypoint-initdb.d/pg_hba.conf && chown postgres:postgres /docker-entrypoint-initdb.d/pg_hba.conf
|
||||
RUN cp /mnt/fradrive/docker/database/postgresql.conf /docker-entrypoint-initdb.d/postgresql.conf && chown postgres:postgres /docker-entrypoint-initdb.d/postgresql.conf
|
||||
|
||||
RUN cp /mnt/fradrive/docker/database/schema.sql /schema.sql && chown postgres:postgres /schema.sql
|
||||
RUN cp /mnt/fradrive/docker/database/initdb.sh /etc/fradrive-db && chmod 755 /etc/fradrive-db
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# Init and start the postgres daemon
|
||||
initdb --no-locale
|
||||
pg_ctl start -w -o "-c listen_addresses=0.0.0.0 -c unix_socket_permissions=0700 -c max_connections=9990 -c shared_preload_libraries=pg_stat_statements -c session_preload_libraries=auto_explain -c auto_explain.log_min_duration=100ms" # COPY postgresql.conf and postgres_hba.conf resulted in error (Invalid data directory)
|
||||
pg_ctl start -w -o "-c listen_addresses='*' -c unix_socket_permissions=0700 -c max_connections=9990 -c shared_preload_libraries=pg_stat_statements -c session_preload_libraries=auto_explain -c auto_explain.log_min_duration=100ms"
|
||||
POSTGRID=`cat /var/lib/postgresql/data/postmaster.pid | perl -le '<>=~m#(\d+)# and print $1'`
|
||||
|
||||
# Create uniworx and uniworx_test database
|
||||
|
||||
@ -1 +1,2 @@
|
||||
local all all trust
|
||||
host all all ::1/128 md5
|
||||
host all postgres 127.0.0.1/32 md5
|
||||
@ -1,4 +1,4 @@
|
||||
listen_addresses=0.0.0.0
|
||||
listen_addresses='*'
|
||||
unix_socket_permissions=0700
|
||||
max_connections=9990
|
||||
shared_preload_libraries=pg_stat_statements
|
||||
|
||||
Loading…
Reference in New Issue
Block a user