Add self-hosted deployment configuration
- Add backend entry point (cmd/server/main.go) - Add prompt=select_account to Google OAuth flow - Add combined init.sql for self-hosted PostgreSQL - Update docker-compose to include backend service with memory limits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./backend/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
command: postgres -c shared_buffers=128MB -c max_connections=50
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
@@ -24,7 +25,7 @@ services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: realtime-collab-redis
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "64mb", "--maxmemory-policy", "allkeys-lru"]
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
@@ -35,6 +36,22 @@ services:
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: realtime-collab-backend
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
Reference in New Issue
Block a user