chore: ports
This commit is contained in:
+7
-2
@@ -5,12 +5,17 @@
|
||||
# Per-repo .env.example files still exist for running a service standalone.
|
||||
# ======================================================================
|
||||
|
||||
# ---- Ports -----------------------------------------------------------
|
||||
NGINX_PORT=8881 # main entrypoint (browser)
|
||||
API_PORT=8000 # direct backend access (debug / docs)
|
||||
WEBUI_PORT=3000 # rsbuild dev server (internal; proxied through nginx)
|
||||
POSTGRES_PORT=5432
|
||||
REDIS_PORT=6379
|
||||
|
||||
# ---- Postgres (db service) -------------------------------------------
|
||||
POSTGRES_USER=mcma
|
||||
POSTGRES_PASSWORD=mcma
|
||||
POSTGRES_DB=mcma
|
||||
POSTGRES_PORT=5432
|
||||
REDIS_PORT=6379
|
||||
|
||||
# ---- Backend (api + worker) ------------------------------------------
|
||||
ENVIRONMENT=dev # dev | test | prod
|
||||
|
||||
+8
-8
@@ -54,12 +54,12 @@ services:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-mcma}:${POSTGRES_PASSWORD:-mcma}@db:5432/${POSTGRES_DB:-mcma}
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
volumes:
|
||||
- ./mcma-backend:/app # live source (hot reload)
|
||||
- /app/.venv # keep the image's venv, don't shadow it
|
||||
- ./mcma-backend:/app # live source (hot reload)
|
||||
- /app/.venv # keep the image's venv, don't shadow it
|
||||
- media:/data/media
|
||||
- transcode_cache:/data/transcode-cache
|
||||
ports:
|
||||
- "8000:8000" # direct access for debugging / docs
|
||||
- "${API_PORT:-8000}:8000" # direct access for debugging / docs
|
||||
depends_on:
|
||||
db: { condition: service_healthy }
|
||||
redis: { condition: service_healthy }
|
||||
@@ -91,21 +91,21 @@ services:
|
||||
env_file: .env
|
||||
environment:
|
||||
RSBUILD_HOST: 0.0.0.0
|
||||
RSBUILD_PORT: "3000"
|
||||
RSBUILD_PORT: "${WEBUI_PORT:-3000}"
|
||||
# Browser reaches HMR through nginx on :80, not the container's :3000.
|
||||
RSBUILD_HMR_CLIENT_PORT: "80"
|
||||
RSBUILD_HMR_CLIENT_PORT: "${NGINX_PORT:-8881}"
|
||||
volumes:
|
||||
- ./mcma-webui:/app
|
||||
- /app/node_modules # keep the image's install, don't shadow it
|
||||
- /app/node_modules # keep the image's install, don't shadow it
|
||||
expose:
|
||||
- "3000"
|
||||
- "${WEBUI_PORT:-3000}"
|
||||
restart: unless-stopped
|
||||
|
||||
# -- reverse proxy: single entrypoint at localhost:80 ---------------------
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "${NGINX_PORT:-8881}:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user