chore: add docker compose to run services like postgres locally

This commit is contained in:
BlankParticle
2025-02-07 22:27:48 +05:30
parent 3b6ed7cd70
commit 0925dcebf2
3 changed files with 23 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
BASE_URL=http://localhost:3000
DATABASE_URL="postgresql://user:password@localhost:5432/db_name"
BETTER_AUTH_SECRET=
DATABASE_URL="postgresql://postgres:super-secret-password@localhost:5432/mail0"
BETTER_AUTH_SECRET=my-better-auth-secret # Change this to a random string, use `openssl rand -hex 32` to generate a 32 character string
BETTER_AUTH_URL=http://localhost:3000 #Base URL of your app
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

17
docker-compose.yaml Normal file
View File

@@ -0,0 +1,17 @@
services:
db:
container_name: mail0-db
image: postgres:17
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: super-secret-password
POSTGRES_DB: mail0
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
postgres-data:

View File

@@ -14,7 +14,10 @@
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
"db:studio": "drizzle-kit studio",
"docker:up": "docker-compose up -d",
"docker:down": "docker-compose down",
"docker:clean": "docker-compose down -v"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.3",