This commit is contained in:
parent
cda0db0ad6
commit
46e92f1473
|
|
@ -318,12 +318,6 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
|
|||
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# 在 entrypoint.sh 中 docker_init_database_dir 后添加修改 listen_addresses 的 sed 行
|
||||
RUN sed -i '/docker_init_database_dir/a\
|
||||
sed -i "s/^#*\\s*listen_addresses\\s*=.*/listen_addresses = '\''0.0.0.0'\''/" \"$PGDATA\"/postgresql.conf' \
|
||||
/usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql
|
||||
|
||||
COPY supervisord.conf ./etc/
|
||||
|
|
|
|||
|
|
@ -339,6 +339,9 @@ _main() {
|
|||
ls /docker-entrypoint-initdb.d/ > /dev/null
|
||||
|
||||
docker_init_database_dir
|
||||
|
||||
sed -i "s/^#*\s*listen_addresses\s*=.*/listen_addresses = '0.0.0.0'/" "$PGDATA"/postgresql.conf
|
||||
|
||||
pg_setup_hba_conf "$@"
|
||||
|
||||
# PGPASSWORD is required for psql when authentication is required for 'local' connections via pg_hba.conf and is otherwise harmless
|
||||
|
|
|
|||
Loading…
Reference in New Issue