File tree 3 files changed +4
-2
lines changed
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,7 @@ ARG mode
11
11
# with a data directory that is empty
12
12
# See https://docs.docker.com/samples/library/postgres/#initialization-scripts
13
13
COPY ./pg.$mode.setup.sh /docker-entrypoint-initdb.d/pg.$mode.setup.sh
14
+
15
+ # Set PGDATA immediate after shebang
16
+ RUN set -ex \
17
+ && sed -i "2s/^/PGDATA=\/ var\/ lib\/ postgresql\/ data\/ $mode\/ " '$HOSTNAME' "\n\n /" /usr/local/bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change 1
1
# database
2
- PGDATA = /var/lib/postgresql/data/pgdata_master
3
2
POSTGRES_USER = devops
4
3
POSTGRES_PASSWORD = devops
5
4
POSTGRES_DB = postgres
Original file line number Diff line number Diff line change 1
1
# database
2
- PGDATA = /var/lib/postgresql/data/pgdata_standby
3
2
PG_MASTER_HOST = db.master
4
3
PG_MASTER_PORT = 5432
5
4
PG_MASTER_REP_USER = devops_rep
You can’t perform that action at this time.
0 commit comments