Skip to content

Commit 17b2725

Browse files
committed
Use port 5433 when setting up database to restrict remote access
1 parent a84d0a3 commit 17b2725

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

superset-db/entrypoint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22

33
if [ -z "$(ls -A $PGDATA)" ]; then
4+
SETUP_PORT=5433
45
initdb -E UTF8 --locale=C
56
cp /init/pg_hba.conf /init/postgresql.conf "$PGDATA"/
6-
pg_ctl -w start
7-
/init/setup.sh
8-
pg_ctl -w -m smart stop
7+
pg_ctl -o "-p $SETUP_PORT" -w start
8+
/init/setup.sh $SETUP_PORT
9+
pg_ctl -o "-p $SETUP_PORT" -w -m smart stop
910
fi
1011

1112
exec "$@"

superset-db/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
psql << EOF
3+
psql -p $1 << EOF
44
/* Create database used to store Superset users, etc. */
55
CREATE DATABASE superset;
66

0 commit comments

Comments
 (0)