2025-12-02 11:06:54 +09:00
|
|
|
# =============================================================================
|
2025-12-11 18:51:13 +09:00
|
|
|
# Customer Portal - Portainer Environment Variables
|
2025-12-02 11:06:54 +09:00
|
|
|
# =============================================================================
|
2025-12-11 18:51:13 +09:00
|
|
|
# Copy these into Portainer UI when creating/updating the stack
|
|
|
|
|
# Replace all placeholder values with your actual secrets
|
2025-12-02 11:06:54 +09:00
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Images & Ports
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2025-12-11 10:44:21 +09:00
|
|
|
FRONTEND_IMAGE=portal-frontend
|
|
|
|
|
BACKEND_IMAGE=portal-backend
|
|
|
|
|
IMAGE_TAG=latest
|
2025-12-02 11:06:54 +09:00
|
|
|
FRONTEND_PORT=3000
|
|
|
|
|
BACKEND_PORT=4000
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Application
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
APP_NAME=customer-portal-bff
|
2025-12-11 18:51:13 +09:00
|
|
|
APP_BASE_URL=https://asolutions.jp
|
|
|
|
|
CORS_ORIGIN=https://asolutions.jp
|
2025-12-02 11:06:54 +09:00
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Database (PostgreSQL)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
POSTGRES_DB=portal_prod
|
|
|
|
|
POSTGRES_USER=portal
|
2025-12-11 18:51:13 +09:00
|
|
|
POSTGRES_PASSWORD=<GENERATE_WITH_openssl_rand_base64_24>
|
2025-12-02 11:06:54 +09:00
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Security & Auth
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Generate with: openssl rand -base64 32
|
2025-12-11 18:51:13 +09:00
|
|
|
JWT_SECRET=<GENERATE_WITH_openssl_rand_base64_32>
|
2025-12-12 16:02:21 +09:00
|
|
|
JWT_SECRET_PREVIOUS=
|
2025-12-02 11:06:54 +09:00
|
|
|
JWT_EXPIRES_IN=7d
|
2025-12-12 18:44:26 +09:00
|
|
|
# JWT claim validation (required; must be non-empty strings)
|
|
|
|
|
# - JWT_ISSUER: who issues tokens (this backend). Use your production origin.
|
|
|
|
|
# - JWT_AUDIENCE: who the token is intended for (your portal/app). Often same as issuer.
|
|
|
|
|
# Keep these stable per environment to prevent prod/dev token mix-ups.
|
|
|
|
|
JWT_ISSUER=https://asolutions.jp
|
|
|
|
|
JWT_AUDIENCE=https://asolutions.jp
|
2025-12-02 11:06:54 +09:00
|
|
|
BCRYPT_ROUNDS=12
|
2025-12-11 18:51:13 +09:00
|
|
|
CSRF_SECRET_KEY=<GENERATE_WITH_openssl_rand_base64_32>
|
2025-12-02 11:06:54 +09:00
|
|
|
|
|
|
|
|
# Auth Settings
|
|
|
|
|
AUTH_ALLOW_REDIS_TOKEN_FAILOPEN=false
|
|
|
|
|
AUTH_REQUIRE_REDIS_FOR_TOKENS=false
|
2025-12-12 16:02:21 +09:00
|
|
|
AUTH_BLACKLIST_FAIL_CLOSED=false
|
2025-12-02 11:06:54 +09:00
|
|
|
AUTH_MAINTENANCE_MODE=false
|
|
|
|
|
|
|
|
|
|
# Rate Limiting
|
|
|
|
|
RATE_LIMIT_TTL=60
|
|
|
|
|
RATE_LIMIT_LIMIT=100
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# WHMCS Integration
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2025-12-11 18:51:13 +09:00
|
|
|
WHMCS_BASE_URL=https://accounts.asolutions.co.jp
|
|
|
|
|
WHMCS_API_IDENTIFIER=<YOUR_WHMCS_API_IDENTIFIER>
|
|
|
|
|
WHMCS_API_SECRET=<YOUR_WHMCS_API_SECRET>
|
2025-12-02 11:06:54 +09:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Salesforce Integration
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2025-12-11 18:51:13 +09:00
|
|
|
SF_LOGIN_URL=https://asolutions.my.salesforce.com
|
|
|
|
|
SF_CLIENT_ID=<YOUR_SF_CLIENT_ID>
|
|
|
|
|
SF_USERNAME=<YOUR_SF_USERNAME>
|
2025-12-02 11:06:54 +09:00
|
|
|
SF_EVENTS_ENABLED=true
|
|
|
|
|
|
2025-12-12 18:44:26 +09:00
|
|
|
# Salesforce Private Key (recommended handling)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# IMPORTANT:
|
|
|
|
|
# - Do NOT paste raw PEM in Portainer env.
|
|
|
|
|
# - Prefer mounting the key file into the container and setting SF_PRIVATE_KEY_PATH.
|
|
|
|
|
# - If you must use env, use SF_PRIVATE_KEY_BASE64 (single-line base64) and the container
|
|
|
|
|
# entrypoint will write it to SF_PRIVATE_KEY_PATH.
|
|
|
|
|
#
|
|
|
|
|
# Option A (preferred): mount a file (no env secret)
|
|
|
|
|
# - Mount host file -> /app/secrets/sf-private.key (read-only)
|
|
|
|
|
# - Set:
|
|
|
|
|
# SF_PRIVATE_KEY_PATH=/app/secrets/sf-private.key
|
|
|
|
|
# - Leave SF_PRIVATE_KEY_BASE64 empty/unset
|
|
|
|
|
#
|
|
|
|
|
# Option B: env var (least preferred)
|
|
|
|
|
# 1) Ensure you have the *private key* PEM (NOT a certificate):
|
|
|
|
|
# -----BEGIN PRIVATE KEY----- (PKCS8) OR -----BEGIN RSA PRIVATE KEY----- (PKCS1)
|
|
|
|
|
# 2) Base64 encode into ONE line (Linux):
|
|
|
|
|
# base64 -w0 sf-private.key
|
|
|
|
|
# 3) Paste that output into SF_PRIVATE_KEY_BASE64 (no quotes, no newlines)
|
|
|
|
|
#
|
|
|
|
|
# NOTE: Never commit real key material into git. Keep only placeholders here.
|
|
|
|
|
SF_PRIVATE_KEY_BASE64=<BASE64_ENCODED_SALESFORCE_PRIVATE_KEY>
|
2025-12-11 18:51:13 +09:00
|
|
|
|
2025-12-02 11:06:54 +09:00
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Freebit SIM API
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
FREEBIT_BASE_URL=https://i1.mvno.net/emptool/api
|
2025-12-11 18:51:13 +09:00
|
|
|
FREEBIT_OEM_ID=PASI
|
|
|
|
|
FREEBIT_OEM_KEY=<YOUR_FREEBIT_OEM_KEY>
|
2025-12-02 11:06:54 +09:00
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Email (SendGrid)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
EMAIL_ENABLED=true
|
2025-12-11 18:51:13 +09:00
|
|
|
EMAIL_FROM=no-reply@asolutions.jp
|
|
|
|
|
EMAIL_FROM_NAME=Assist Solutions
|
2025-12-02 11:06:54 +09:00
|
|
|
SENDGRID_API_KEY=<YOUR-SENDGRID-API-KEY>
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Salesforce Portal Config
|
|
|
|
|
# -----------------------------------------------------------------------------
|
2025-12-11 18:51:13 +09:00
|
|
|
PORTAL_PRICEBOOK_ID=<YOUR_SF_PRICEBOOK_ID>
|
2025-12-02 11:06:54 +09:00
|
|
|
PORTAL_PRICEBOOK_NAME=Portal
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Logging
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
LOG_LEVEL=info
|