From 8f8f26c6d344a7f4e2158e3666fb74b61fde5c95 Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Wed, 30 Oct 2024 19:52:15 +0000 Subject: [PATCH] update postgres to v15.3 --- apps/iatlas/postgres/README.md | 11 +++++++++++ .../postgres/docker-entrypoint-initdb.d/init-db.sql | 8 ++++++-- lint-staged.config.js | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 apps/iatlas/postgres/README.md diff --git a/apps/iatlas/postgres/README.md b/apps/iatlas/postgres/README.md new file mode 100644 index 0000000000..5f13984003 --- /dev/null +++ b/apps/iatlas/postgres/README.md @@ -0,0 +1,11 @@ +# iAtlas PostgreSQL + +## Build the Docker image + +``` +nx build-image iatlas-postgres +``` + +## References + +- https://github.com/generalui/postgres_docker diff --git a/apps/iatlas/postgres/docker-entrypoint-initdb.d/init-db.sql b/apps/iatlas/postgres/docker-entrypoint-initdb.d/init-db.sql index ea9b008cd5..bd3156d84a 100644 --- a/apps/iatlas/postgres/docker-entrypoint-initdb.d/init-db.sql +++ b/apps/iatlas/postgres/docker-entrypoint-initdb.d/init-db.sql @@ -1,4 +1,8 @@ --- iatlas -CREATE USER iatlas WITH ENCRYPTED PASSWORD 'changeme'; +-- sqlfluff:dialect:postgres +CREATE USER iatlas +WITH + ENCRYPTED PASSWORD 'changeme'; + CREATE DATABASE iatlas; + GRANT ALL PRIVILEGES ON DATABASE iatlas TO iatlas; diff --git a/lint-staged.config.js b/lint-staged.config.js index 97f10d66e9..faa62866f5 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -37,8 +37,8 @@ module.exports = { '**/*.sql': (filenames) => [ // Format files with Prettier `prettier --write ${filenames.join(' ')}`, - // Lint files with SQLFluff - `poetry run sqlfluff lint ${filenames.join(' ')}`, + // Lint files with SQLFluff (conflicts with SQL formatter) + // `poetry run sqlfluff lint ${filenames.join(' ')}`, ], '**/*': (filenames) => [