Skip to content

Commit 29f8126

Browse files
committed
fix: 초기 DDL이 실행되지 않는 현상 수정
1 parent 1a33a78 commit 29f8126

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

docker/docker-compose-postgres.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ services:
1010
ports:
1111
- "5432:5432"
1212
environment:
13-
POSTGRES_USER: root
14-
POSTGRES_PASSWORD: rootpassword
13+
POSTGRES_USER: postgres
14+
POSTGRES_PASSWORD: postgres
1515
POSTGRES_DB: postgres
1616
TZ: Asia/Seoul
1717
LANG: en_US.utf8
1818
volumes:
1919
- postgres_data:/var/lib/postgresql/data
20-
- ./postgres/init:/docker-entrypoint-initdb.d/init.sql
20+
- ./postgres/init:/docker-entrypoint-initdb.d
2121

2222
volumes:
2323
postgres_data:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CREATE DATABASE lang2sql;
2+
CREATE DATABASE test;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CREATE USER lang2sql WITH PASSWORD 'lang2sqlpassword';
2+
GRANT ALL PRIVILEGES ON DATABASE lang2sql TO lang2sql;
3+
4+
CREATE USER test WITH PASSWORD 'testpassword';
5+
GRANT ALL PRIVILEGES ON DATABASE test TO test;

docker/postgres/init/init.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)