Added dev db setup

This commit is contained in:
2024-10-03 16:16:45 +02:00
parent 044b3ac901
commit f5827809c0
2 changed files with 16 additions and 0 deletions

14
dev-db.yml Normal file
View File

@@ -0,0 +1,14 @@
---
services:
db:
container_name: postgres-dev
image: postgres
restart: unless-stopped
volumes:
- ./dev/data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=dev
- POSTGRES_USER=dev
- POSTGRES_DB=illegitimate

View File

@@ -27,6 +27,8 @@
"db:generate": "drizzle-kit generate", "db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate", "db:migrate": "drizzle-kit migrate",
"db:studio": "drizzle-kit studio", "db:studio": "drizzle-kit studio",
"db:start": "docker compose -f dev-db.yml up -d",
"db:stop": "docker compose -f dev-db.yml down",
"push:prod": "tsx scripts/deploy-commands.ts", "push:prod": "tsx scripts/deploy-commands.ts",
"push:dev": "tsx scripts/dev-deploy.ts", "push:dev": "tsx scripts/dev-deploy.ts",
"delete:dev": "tsx scripts/delete-commands.ts" "delete:dev": "tsx scripts/delete-commands.ts"