build multi tenant

This commit is contained in:
2025-10-12 15:47:00 +07:00
parent e466e2f801
commit 1fbb202002
24 changed files with 1947 additions and 29 deletions

42
docker-compose.yml Normal file
View File

@@ -0,0 +1,42 @@
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: geeklife
POSTGRES_USER: postgres
POSTGRES_PASSWORD: geeklife_password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
geek-life:
build: .
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: geeklife_password
DB_NAME: geeklife
DB_SSLMODE: disable
JWT_SECRET: your-super-secret-jwt-key-change-in-production
SESSION_DURATION: 24
ENVIRONMENT: production
LOG_LEVEL: info
volumes:
- ./migrations:/app/migrations
command: sh -c "./geek-life --migrate && ./geek-life"
restart: unless-stopped
volumes:
postgres_data: