add docker yml for postgres

This commit is contained in:
MLH
2025-04-07 22:45:42 +02:00
parent f106a9b2b6
commit 226ee1d476
2 changed files with 21 additions and 0 deletions

3
.gitignore vendored
View File

@ -34,6 +34,9 @@ out
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# psql data directory
pg_data
npm-debug.log
key.pem

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
services:
db:
image: postgres:latest
container_name: postgresql
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: ttdb
ports:
- "5432:5432"
volumes:
- ./pg_data:/var/lib/postgresql/data
- ./src/db/init.sql:/docker-entrypoint-initdb.d/init.sql
volumes:
pg_data:
driver: local