diff --git a/.env.mac-docker.example b/.env.mac-docker.example index d5213b5d..0a934257 100644 --- a/.env.mac-docker.example +++ b/.env.mac-docker.example @@ -1,40 +1,53 @@ -# 当前模板用于 mac 本机 Docker 调试。 -# 开发版 Caddy 会接受任意 Host;如果你要给外部用户发领取链接, -# 只需要把 APP_BASE_URL / CLAIM_BASE_URL 改成当前公网地址。 +# Mac Docker development template. Copy to .env for local full-stack testing. +# For public claim links, update APP_BASE_URL and CLAIM_BASE_URL together. +# App +APP_DOMAIN=localhost APP_BASE_URL=http://localhost - +CADDY_SITE_ADDR=http://localhost TZ=Asia/Shanghai BACKEND_PORT=3000 -CLAIM_BASE_URL=http://localhost/#/claim +# Claim Links +CLAIM_BASE_URL=http://localhost/#/claim +CLAIM_TOKEN_TTL_HOURS=24 + +# Database POSTGRES_DB=order_site POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres DATABASE_URL=postgres://postgres:postgres@postgres:5432/order_site DATABASE_SSL=false DATABASE_MAX_CONNECTIONS=10 +POSTGRES_PORT=5432 +# Data And Logging DATA_ROOT=/app/data LOG_LEVEL=info + +# OCR OCR_IMAGE=order_site-ocr-worker:latest OCR_PORT=8100 +OCR_BASE_URL=http://ocr-worker:8100 +# Tencent Browser TENCENT_REDEEM_PROOF_MODE=basic TENCENT_BROWSER_HEADLESS=false TENCENT_BROWSER_DEVTOOLS=false TENCENT_BROWSER_PREWARM=true TENCENT_BROWSER_KEEP_ALIVE=true TENCENT_BROWSER_SLOW_MO=200 +TENCENT_BROWSER_VNC_RESOLUTION=1600x900x24 TENCENT_SESSION_DEBUG=true TENCENT_BROWSER_NOVNC_ENABLED=true TENCENT_BROWSER_NOVNC_PORT=6080 TENCENT_BROWSER_VNC_PORT=5900 -TENCENT_BROWSER_VNC_RESOLUTION=1600x900x24 +# Admin ADMIN_SESSION_SECRET=dev-local-session-secret ADMIN_SESSION_TTL_HOURS=12 ADMIN_DEFAULT_USERS_JSON=[{"username":"admin","password":"dev-admin-123456","role":"admin"},{"username":"operator","password":"dev-operator-123456","role":"operator"}] +# Agiso AGISO_APP_SECRET= AGISO_MESSAGING_ENABLED=true AGISO_TRADE_DETAIL_ENDPOINT=https://gw-api.agiso.com/aldsIdle/Order/Detail @@ -45,3 +58,12 @@ AGISO_AUTO_DELIVERY_ENDPOINT=https://gw-api.agiso.com/aldsIdle/Order/DummySend AGISO_AUTO_DELIVERY_API_VERSION=1 AGISO_MESSAGE_API_VERSION=1 AGISO_SEND_MESSAGE_ENDPOINT=https://gw-api.agiso.com/aldsIdle/ImMsg/SendMsg + +# 91Kaquan +NINETYONE_USER_ID= +NINETYONE_SECRET= +NINETYONE_VERSION=1.0 +NINETYONE_SHOP_ID=91kaquan +NINETYONE_SHOP_NAME=91卡券 +NINETYONE_TIMESTAMP_TOLERANCE_SECONDS=600 +NINETYONE_CARDS_ENCODING=aes-256-ecb-base64 diff --git a/.env.server.example b/.env.server.example index 697b9bfa..20443117 100644 --- a/.env.server.example +++ b/.env.server.example @@ -1,12 +1,17 @@ +# Production deployment template. Copy to .env and replace every change-me value. +# Keep real secrets out of git. +# App APP_DOMAIN=order.khhao.com APP_BASE_URL=https://order.khhao.com CADDY_SITE_ADDR=https://order.khhao.com - TZ=Asia/Shanghai BACKEND_PORT=3000 + +# Claim Links CLAIM_BASE_URL=https://order.khhao.com/#/claim CLAIM_TOKEN_TTL_HOURS=24 +# Database POSTGRES_DB=order_site POSTGRES_USER=postgres POSTGRES_PASSWORD=change-me-postgres-password @@ -14,10 +19,15 @@ DATABASE_URL=postgres://postgres:change-me-postgres-password@postgres:5432/order DATABASE_SSL=false DATABASE_MAX_CONNECTIONS=20 +# Data And Logging DATA_ROOT=/app/data LOG_LEVEL=info -OCR_IMAGE=order_site-ocr-worker:latest +# OCR +OCR_IMAGE=order_site-ocr-worker:latest +OCR_BASE_URL=http://ocr-worker:8100 + +# Tencent Browser TENCENT_REDEEM_PROOF_MODE=full TENCENT_BROWSER_HEADLESS=true TENCENT_BROWSER_DEVTOOLS=false @@ -26,20 +36,13 @@ TENCENT_BROWSER_KEEP_ALIVE=true TENCENT_BROWSER_SLOW_MO=0 TENCENT_BROWSER_VNC_RESOLUTION=1600x900x24 TENCENT_SESSION_DEBUG=false -CLOUDTENTACLES_BIND_URL_TTL_SECONDS=600 -CLOUDTENTACLES_BIND_URL_PROBE_INTERVAL_SECONDS=30 -CLOUDTENTACLES_BIND_URL_PROBE_TIMEOUT_MS=5000 -CLOUDTENTACLES_BIND_URL_PROBE_ENDPOINT=https://comm.ams.game.qq.com/ide/ -CLOUDTENTACLES_BIND_URL_PROBE_CHART_ID=323794 -CLOUDTENTACLES_BIND_URL_PROBE_SUB_CHART_ID=323794 -CLOUDTENTACLES_BIND_URL_PROBE_IDE_TOKEN=z90Syo -CLOUDTENTACLES_BIND_URL_PROBE_ACTIVITY_URL=http%3A%2F%2Fgp.qq.com%2Fcp%2Fa20240828cmcc%2F -CLOUDTENTACLES_BIND_URL_PROBE_REFERER=https://gp.qq.com/ +# Admin ADMIN_SESSION_SECRET=change-me-long-random-session-secret ADMIN_SESSION_TTL_HOURS=12 ADMIN_DEFAULT_USERS_JSON=[{"username":"admin","password":"change-me-admin-password","role":"admin"},{"username":"operator","password":"change-me-operator-password","role":"operator"}] +# Agiso AGISO_APP_SECRET=change-me-agiso-app-secret AGISO_MESSAGING_ENABLED=true AGISO_TRADE_DETAIL_ENDPOINT=https://gw-api.agiso.com/aldsIdle/Order/Detail @@ -50,3 +53,12 @@ AGISO_AUTO_DELIVERY_ENDPOINT=https://gw-api.agiso.com/aldsIdle/Order/DummySend AGISO_AUTO_DELIVERY_API_VERSION=1 AGISO_MESSAGE_API_VERSION=1 AGISO_SEND_MESSAGE_ENDPOINT=https://gw-api.agiso.com/aldsIdle/ImMsg/SendMsg + +# 91Kaquan +NINETYONE_USER_ID= +NINETYONE_SECRET= +NINETYONE_VERSION=1.0 +NINETYONE_SHOP_ID=91kaquan +NINETYONE_SHOP_NAME=91卡券 +NINETYONE_TIMESTAMP_TOLERANCE_SECONDS=600 +NINETYONE_CARDS_ENCODING=aes-256-ecb-base64 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6dcbb5ae..b8a880eb 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -62,7 +62,7 @@ services: DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/order_site} DATABASE_SSL: ${DATABASE_SSL:-false} DATABASE_MAX_CONNECTIONS: ${DATABASE_MAX_CONNECTIONS:-10} - DATA_ROOT: ${DATA_ROOT:-/app/data} + DATA_ROOT: /app/data OCR_BASE_URL: ${OCR_BASE_URL:-http://ocr-worker:8100} CLAIM_BASE_URL: ${CLAIM_BASE_URL:-http://localhost/#/claim} TENCENT_REDEEM_PROOF_MODE: ${TENCENT_REDEEM_PROOF_MODE:-full} diff --git a/docker-compose.yml b/docker-compose.yml index c23e27dd..cd0c8e88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,7 +56,7 @@ services: DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/order_site} DATABASE_SSL: ${DATABASE_SSL:-false} DATABASE_MAX_CONNECTIONS: ${DATABASE_MAX_CONNECTIONS:-20} - DATA_ROOT: ${DATA_ROOT:-/app/data} + DATA_ROOT: /app/data OCR_BASE_URL: ${OCR_BASE_URL:-http://ocr-worker:8100} CLAIM_BASE_URL: ${CLAIM_BASE_URL:-http://localhost/#/claim} TENCENT_REDEEM_PROOF_MODE: ${TENCENT_REDEEM_PROOF_MODE:-full}