Initial commit: stack
This commit is contained in:
commit
fe16a07dd7
11 changed files with 2058 additions and 0 deletions
19
infrastructure/postgres/docker-compose.yml
Normal file
19
infrastructure/postgres/docker-compose.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=${PG_SUPERPASS}
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- ./init:/docker-entrypoint-initdb.d:ro
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
retries: 10
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
4
infrastructure/postgres/init/auth.sql
Normal file
4
infrastructure/postgres/init/auth.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
CREATE USER auth WITH PASSWORD 'CHANGE_ME';
|
||||
CREATE DATABASE auth_db OWNER auth;
|
||||
\c auth_db
|
||||
GRANT ALL ON SCHEMA public TO auth;
|
||||
4
infrastructure/postgres/init/noticeboard.sql
Normal file
4
infrastructure/postgres/init/noticeboard.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
CREATE USER noticeboard WITH PASSWORD 'CHANGE_ME';
|
||||
CREATE DATABASE noticeboard_db OWNER noticeboard;
|
||||
\c noticeboard_db
|
||||
GRANT ALL ON SCHEMA public TO noticeboard;
|
||||
Loading…
Add table
Add a link
Reference in a new issue