new file: .dockerignore

new file:   .env.example
	new file:   Dockerfile
	modified:   backend/.env.example
	modified:   backend/package.json
	renamed:    backend/src/migrations/run.ts -> backend/src/scripts/run.ts
	renamed:    backend/src/migrations/seed.ts -> backend/src/scripts/seed.ts
	new file:   docker-compose.external-db.yml
	new file:   docker-compose.yml
This commit is contained in:
2025-12-18 13:01:25 +03:00
parent 12736f5b79
commit 9a08396610
9 changed files with 246 additions and 36 deletions

View File

@@ -0,0 +1,29 @@
# ============================================
# KIS API Builder - External Database
# ============================================
# Use this when you have your own PostgreSQL
#
# 1. Copy .env.example to .env
# 2. Set DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD
# 3. Run: docker compose -f docker-compose.external-db.yml up -d
# ============================================
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: kis-api-builder-app
restart: unless-stopped
ports:
- "${APP_PORT:-3000}:3000"
environment:
NODE_ENV: production
PORT: 3000
DB_HOST: ${DB_HOST:?DB_HOST is required}
DB_PORT: ${DB_PORT:-5432}
DB_NAME: ${DB_NAME:-api_builder}
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
JWT_SECRET: ${JWT_SECRET:-change-this-secret-in-production}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}