From 9fc17d3711847d0d3c0e23af190fe813531b5234 Mon Sep 17 00:00:00 2001 From: kashiuno Date: Sat, 4 Jan 2025 10:15:52 +0300 Subject: [PATCH] Initial commit with postgresql in docker-compose --- .gitignore | 2 ++ docker-compose.yaml | 9 +++++++++ init.d/init-db.sql | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yaml create mode 100644 init.d/init-db.sql diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29b636a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*.iml \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..08b2d1d --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,9 @@ +services: + postgres: + image: postgres:17.2 + environment: + POSTGRES_PASSWORD: 123 + volumes: + - ./init.d/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql + ports: + - '5432:5432' \ No newline at end of file diff --git a/init.d/init-db.sql b/init.d/init-db.sql new file mode 100644 index 0000000..4a186b2 --- /dev/null +++ b/init.d/init-db.sql @@ -0,0 +1,3 @@ +create user qr_access_user with password '123'; + +create database qr_access with owner qr_access_user; \ No newline at end of file