feat: Michess – Initiales Setup auf Basis von chessu
- Rebranding: chessu → Michess (Header, Footer, Metadata, Session-Cookie) - Stockfish KI-Integration: 6 Schwierigkeitsgrade (Anfänger bis Meister) - Admin-Panel: Nutzerverwaltung, Sperren/Entsperren, Git-Pull-Update - Freundessystem: Anfragen, Freundesliste, Nutzersuche - DB-Schema: role, banned, friend_request, friendship Tabellen - Docker: NAS-optimiertes docker-compose.yml mit PostgreSQL Healthcheck - Stockfish binary via apk im Alpine-Image installiert - .env.example für einfaches Deployment - scripts/update.sh für manuelles NAS-Update - Brain.md + Plan.md als Projekt-Gedächtnis Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,37 +1,64 @@
|
||||
version: '3.8'
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
chessu:
|
||||
image: chessu:latest # Replace with the correct image if needed
|
||||
container_name: chessu_container
|
||||
michess:
|
||||
build: .
|
||||
image: michess:latest
|
||||
container_name: michess
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: chessu
|
||||
POSTGRES_USER: exampleuser
|
||||
POSTGRES_PASSWORD: examplepassword
|
||||
DATABASE_URL: postgres://chessu_user:chessu_pass@db:5432/chessu
|
||||
NODE_ENV: production
|
||||
# PostgreSQL connection (uses 'db' service below)
|
||||
PGHOST: db
|
||||
PGPORT: 5432
|
||||
PGDATABASE: ${POSTGRES_DB:-michess}
|
||||
PGUSER: ${POSTGRES_USER:-michess}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
||||
# App config
|
||||
PORT: 3001
|
||||
SESSION_SECRET: ${SESSION_SECRET:-change-this-secret-in-production}
|
||||
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:3000}
|
||||
# Admin setup: user with this email gets admin role on startup
|
||||
ADMIN_EMAIL: ${ADMIN_EMAIL:-}
|
||||
# Stockfish binary path (stockfish is installed in the image)
|
||||
STOCKFISH_PATH: stockfish
|
||||
# Git update path (used by admin panel update button)
|
||||
APP_DIR: /opt/michess
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
- "${MICHESS_PORT:-3000}:3000"
|
||||
- "${MICHESS_API_PORT:-3001}:3001"
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- app_pnpm:/opt/michess/.pnpm-store
|
||||
networks:
|
||||
- chessu_network
|
||||
- michess_net
|
||||
|
||||
db:
|
||||
image: postgres:15
|
||||
container_name: postgres_container
|
||||
image: postgres:16-alpine
|
||||
container_name: michess_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: chessu
|
||||
POSTGRES_USER: exampleuser
|
||||
POSTGRES_PASSWORD: examplepassword
|
||||
POSTGRES_DB: ${POSTGRES_DB:-michess}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-michess}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- chessu_network
|
||||
- michess_net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-michess}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
app_pnpm:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
chessu_network:
|
||||
michess_net:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user