chore(backend): Postgres in Docker
Voeg Postgres toe aan simpele docker compose Initialisatiescript
This commit is contained in:
parent
624faaae93
commit
9bd7696c7b
2 changed files with 18 additions and 0 deletions
2
backend/config/db/init.sql
Normal file
2
backend/config/db/init.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
-- Create the database
|
||||||
|
CREATE DATABASE dwengo;
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
network_mode: "host"
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
- ./backend/config/db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
Loading…
Add table
Add a link
Reference in a new issue