ready to test

Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-22 10:06:58 +08:00
parent bf48c95467
commit 439bb33f77
189 changed files with 17559 additions and 686 deletions
+78
View File
@@ -0,0 +1,78 @@
# ═══════════════════════════════════════════════════════════════════════════════
# $APP_NAME — Docker Compose (self-hosted)
#
# Prerequisites:
# 1. Backend → cp .env.example .env and fill in all CHANGE_ME values
# 2. Frontend → cd ../new_starr_app && cp .env.example .env → fill in values
# → npm run build (must run BEFORE building the Docker image)
# 3. Run: docker compose up -d
#
# ⚠ SSL NOTE — db.config.js and the session store both require SSL from
# PostgreSQL. The bundled `postgres` service here ships without SSL by
# default, so the backend will refuse to connect. Two options:
#
# Option A (recommended) — use a managed PostgreSQL with SSL:
# Set DB_HOST / DB_PORT / DB_NAME / DB_USER / DB_PASSWORD in .env to
# your managed provider (CockroachDB, Supabase, Neon, etc.) and remove
# the `postgres` service + its depends_on entry below.
#
# Option B — fix the code to make SSL optional:
# Add DB_SSL=false to .env and update db.config.js + the session store
# connection string in server.js to read that flag. Then the bundled
# postgres service works without SSL.
#
# Redis / Valkey:
# In Docker the service is reachable by its service name, not 127.0.0.1.
# Set this in .env: REDIS_URL=redis://valkey:6379
# ═══════════════════════════════════════════════════════════════════════════════
services:
# ── Backend (Express) ───────────────────────────────────────────────────────
backend:
build: .
ports:
- "3024:3024"
env_file: .env
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_started
restart: unless-stopped
# ── Frontend (React / Nginx) ─────────────────────────────────────────────────
# Run `npm run build` inside ../new_starr_app before starting this service.
frontend:
build: ../new_starr_app
ports:
- "80:80"
restart: unless-stopped
# ── PostgreSQL ───────────────────────────────────────────────────────────────
# See SSL NOTE above before using this service.
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# ── Valkey (Redis-compatible cache) ─────────────────────────────────────────
valkey:
image: valkey/valkey:8-alpine
volumes:
- valkey_data:/data
restart: unless-stopped
volumes:
postgres_data:
valkey_data: