chore(backend): Postgres in Docker

Voeg Postgres toe aan simpele docker compose
Initialisatiescript
This commit is contained in:
Tibo De Peuter 2025-02-20 14:52:24 +01:00
parent 624faaae93
commit 9bd7696c7b
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,2 @@
-- Create the database
CREATE DATABASE dwengo;

16
docker-compose.yml Normal file
View 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: