From 8c043a8adb4cf04d56b5acdb9b77b5acac08241e Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Wed, 18 Mar 2026 06:07:56 +0300 Subject: [PATCH] feat: initialize database --- compose.yml | 3 +++ postgres/init.sql | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 postgres/init.sql diff --git a/compose.yml b/compose.yml index 7a5b3de..028d3c5 100644 --- a/compose.yml +++ b/compose.yml @@ -11,6 +11,8 @@ services: - "${POSTGRES_PORT}:5432" volumes: - postgres_data:/var/lib/postgresql/data + - ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro + networks: - teacinema @@ -46,3 +48,4 @@ volumes: networks: teacinema: + external: true diff --git a/postgres/init.sql b/postgres/init.sql new file mode 100644 index 0000000..b3923d3 --- /dev/null +++ b/postgres/init.sql @@ -0,0 +1,2 @@ +CREATE DATABASE teacinema_auth; +CREATE DATABASE teacinema_users;