File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
docker/dockerfiles/postgres Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ services:
53
53
DB_SECRET : ${DB_SECRET}
54
54
DB_USER : ${DB_USER}
55
55
DB_NAME : ${DB_NAME}
56
+ DB_PORT : ${DB_PORT}
56
57
NETWORK : ${NETWORK}
57
58
PGPASSWORD : postgres
58
59
@@ -79,7 +80,7 @@ services:
79
80
volumes :
80
81
- ${DB_PATH}:/var/lib/postgresql/data
81
82
healthcheck :
82
- test : [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME} -p ${DB_PORT} -h localhost"]
83
+ test : [ "CMD-SHELL", "PGPASSWORD=${DB_SECRET} pg_isready -U ${DB_USER} -d ${DB_NAME} -p ${DB_PORT} -h localhost"]
83
84
interval : 10s
84
85
timeout : 3s
85
86
retries : 10
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ RUN apt update && apt install -y \
10
10
git \
11
11
ca-certificates \
12
12
sudo \
13
+ locales \
14
+ && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
15
+ && locale-gen \
16
+ && update-locale LANG=en_US.UTF-8 \
13
17
&& apt clean
14
18
15
19
ENV PG_VERSION_TAG=REL_14_11
Original file line number Diff line number Diff line change @@ -84,11 +84,13 @@ configure_postgres() {
84
84
fi
85
85
done
86
86
87
- echo " host all all 0.0.0.0/0 md5" \
88
- >> $PG_DATA /pg_hba.conf
87
+ if ! grep -q " ^host all all 0.0.0.0/0 md5\$ " " $PG_DATA /pg_hba.conf" ; then
88
+ echo " host all all 0.0.0.0/0 md5" >> " $PG_DATA /pg_hba.conf"
89
+ fi
89
90
90
- echo " listen_addresses='*'" \
91
- >> $PG_DATA /postgresql.conf
91
+ if ! grep -q " ^listen_addresses *= *'\*'\$ " " $PG_DATA /postgresql.conf" ; then
92
+ echo " listen_addresses='*'" >> " $PG_DATA /postgresql.conf"
93
+ fi
92
94
93
95
echo " PostgreSQL configuration updated successfully!"
94
96
}
You can’t perform that action at this time.
0 commit comments