From e1127fcf9093acd25b875500d835d4fd64d678ce Mon Sep 17 00:00:00 2001 From: Vadim Melnik Date: Mon, 18 Sep 2023 17:11:47 +0300 Subject: [PATCH] postgres init.sql script for docker setup to grant privileges on rmdb for repromon user --- docker-compose.dev.yml | 1 + docker-postgres-init.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 docker-postgres-init.sql diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 989e9db..b05629e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -43,6 +43,7 @@ services: # `PODMAN_USERNS=keep-id podman-compose up` volumes: - ${DB_PATH_AT_HOST}/data:/var/lib/postgresql/data + - ./docker-postgres-init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} interval: 30s diff --git a/docker-postgres-init.sql b/docker-postgres-init.sql new file mode 100644 index 0000000..8b3c1c8 --- /dev/null +++ b/docker-postgres-init.sql @@ -0,0 +1 @@ +GRANT ALL PRIVILEGES ON DATABASE rmdb TO repromon;