Skip to content

Commit

Permalink
Criando usuário para conexão
Browse files Browse the repository at this point in the history
  • Loading branch information
EhOBruno committed Sep 6, 2024
1 parent 66dc603 commit c3ad435
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- ../db/trigger_SP.sql:/docker-entrypoint-initdb.d/2_trigger_SP.sql
- ../db/dml.sql:/docker-entrypoint-initdb.d/3_dml.sql
- db_data:/var/lib/postgresql/data
- ../db/create_user.sql:/docker-entrypoint-initdb.d/4_create_user.sql

app:
build:
Expand Down
5 changes: 5 additions & 0 deletions db/create_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Criação do novo usuário
CREATE ROLE minecraft_user WITH LOGIN PASSWORD 'password';

-- Conceder permissões ao novo usuário
GRANT ALL PRIVILEGES ON DATABASE "2024_1_Minecraft" TO minecraft_user;

0 comments on commit c3ad435

Please sign in to comment.