-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.template
More file actions
54 lines (45 loc) · 2.6 KB
/
Copy path.env.template
File metadata and controls
54 lines (45 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# ============================================================
# model-gateway .env.template (Promptly API Gateway)
# Copy to .env and fill in all values before running.
#
# To update a single variable safely on the server use:
# sed -i 's|^BASE_URL=.*|BASE_URL=https://example.com|' .env
# The ^ anchor prevents matching similarly-named vars (e.g. LLAMA_BASE_URL).
# ============================================================
# PostgreSQL
POSTGRES_PASSWORD= # generate: openssl rand -hex 24
# llama-server backend (WireGuard IP of pyrite)
LLAMA_BASE_URL=http://100.64.0.2:8502
LLAMA_API_KEY= # from pyrite's llama-server --api-key
# Gateway
GATEWAY_SECRET_KEY= # generate: openssl rand -hex 32
BASE_URL=https://promptlyapi.com # public-facing URL (no trailing slash)
# Admin panel: ADMIN_KEY protects /admin routes; tailnet IP check is a second layer
ADMIN_KEY= # generate: openssl rand -base64 32
ADMINER_BIND_HOST=100.64.0.1 # gatekeeper's tailscale0 IP; Adminer reachable from tailnet only
# ADMIN_ALLOWED_CIDRS=100.64.0.0/10,127.0.0.1/32 # override if tailnet CIDR differs
# Stripe (get from https://dashboard.stripe.com/apikeys)
# Use sk_test_... / whsec_ from test mode during development; swap for live keys in production.
# Webhook endpoint to register: https://promptlyapi.com/stripe/webhook (event: checkout.session.completed)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_... # from Stripe webhook endpoint config
# SMTP (IONOS)
SMTP_HOST=smtp.ionos.com
SMTP_PORT=587
SMTP_USER=george@promptlyapi.com
SMTP_PASSWORD= # from IONOS account / Alertmanager config
SMTP_FROM=george@promptlyapi.com
# BTCPay Server (self-hosted on gatekeeper, see app/btcpay.py for setup instructions)
BTCPAY_URL=http://100.64.0.1:23000 # internal URL; gateway reaches BTCPay via tailnet
BTCPAY_API_KEY= # from BTCPay Store Settings, Access Tokens
BTCPAY_STORE_ID= # from BTCPay Store Settings, General
BTCPAY_WEBHOOK_SECRET= # from BTCPay Store Settings, Webhooks
# Trial settings
TRIAL_TOKENS=100000
TRIAL_EXPIRY_DAYS=7
# Rate limits
REGISTRATION_RATE_LIMIT=3 # max registrations per IP per hour (default: 3)
REGISTRATION_RATE_WINDOW=3600 # rate limit window in seconds (default: 3600)
REGISTRATION_BURST_LIMIT=2 # max registrations per IP in a short burst window (default: 2)
REGISTRATION_BURST_WINDOW=600 # burst window in seconds (default: 600)
REGISTRATION_CAPTCHA_TTL=300 # captcha validity in seconds (default: 300)