railyard/apps/ritgram/docker-compose.yml
caelum0x f80b04ae0f feat(ritgram): move GitGram app into railyard as Ritgram, next to Rithub
Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram).
AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan.
Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 04:18:46 +03:00

102 lines
3.0 KiB
YAML

# =============================================================================
# Gitgram Only - Docker Compose (for standalone Gitgram development)
# =============================================================================
# For the full multi-product setup (Gitgram + AITM), use the root docker-compose.yml.
# =============================================================================
services:
postgres:
image: postgres:16-alpine
container_name: gitgram-postgres
environment:
POSTGRES_USER: gitgram
POSTGRES_PASSWORD: gitgram_dev
POSTGRES_DB: gitgram
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitgram -d gitgram"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: gitgram-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: gitgram-backend
ports:
- "4000:4000"
environment:
NODE_ENV: development
PORT: "4000"
DATABASE_URL: postgresql://gitgram:gitgram_dev@postgres:5432/gitgram
REDIS_URL: redis://redis:6379
JWT_SECRET: local-dev-jwt-secret-not-for-production-use-replace-me
JWT_REFRESH_SECRET: local-dev-refresh-secret-not-for-production-replace
FRONTEND_URL: http://localhost:3000
CORS_ORIGIN: http://localhost:3000,http://localhost:3001,http://localhost:8081
STORAGE_TYPE: local
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./backend/uploads:/app/uploads
- ./backend/logs:/app/logs
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:4000/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) })\""]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
command: sh -c "npx prisma migrate deploy && node dist/index.js"
restart: unless-stopped
web:
build:
context: ./web
container_name: gitgram-web
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: http://localhost:4000/api
NEXT_PUBLIC_WS_URL: http://localhost:4000
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3000', (r) => { process.exit(r.statusCode < 500 ? 0 : 1) })\""]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
volumes:
postgres_data:
driver: local
redis_data:
driver: local