Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
44 lines (38 loc) · 1.83 KB
/
Copy path.env.example
File metadata and controls
44 lines (38 loc) · 1.83 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
# Required: PostgreSQL connection string for the existing Sub2API database.
# In Docker Compose this usually points to the Postgres service name on the same Docker network.
DATABASE_URL=postgres://sub2api:change-me@postgres:5432/sub2api
PLUGIN_ADMIN_TOKEN=change-me
# Web server listen address inside the container.
HOST=0.0.0.0
PORT=8080
# Initial defaults used only when the plugin settings row is first created.
# Later changes are stored in plugin_oauth_sleeper_settings and can be edited in the UI.
DEFAULT_SLEEP_THRESHOLD_PERCENT=95
SCAN_INTERVAL_SECONDS=300
INCLUDE_OPENAI=true
INCLUDE_ANTHROPIC=true
FRAME_ANCESTORS=https://sub2api.example.com
# Browser base path:
# - Leave empty for direct access (example: http://127.0.0.1:8080/admin)
# - Use /custom/oauth-sleeper when mounted under a reverse-proxy path
PUBLIC_BASE_PATH=/custom/oauth-sleeper
# Safety guardrails for production scans.
# The scanner will never sleep more than MAX_SLEEP_PER_SCAN accounts per platform per scan,
# and will not reduce the remaining platform pool below the configured floor.
MAX_SLEEP_PER_SCAN=3
MIN_REMAINING_OPENAI_ACCOUNTS=40
MIN_REMAINING_ANTHROPIC_ACCOUNTS=5
# Sub2API scheduler refresh. The plugin connects to Redis from inside the Docker network
# and clears the group/platform scheduler keys plus sticky sessions after each scan.
REFRESH_SUB2API_SCHEDULER=true
SUB2API_OPENAI_GROUP_ID=2
SUB2API_REDIS_HOST=redis
SUB2API_REDIS_PORT=6379
# Optional post-scan verification. Leave VERIFY_API_KEY empty unless you want the plugin
# to call the Sub2API OpenAI-compatible endpoint and roll back the current scan on failure.
VERIFY_AFTER_SLEEP=true
VERIFY_MODEL=gpt-5.5
VERIFY_API_URL=http://sub2api:8080/v1/chat/completions
VERIFY_API_KEY=
# Existing Docker network that can reach Sub2API's PostgreSQL and Redis containers.
SUB2API_DOCKER_NETWORK=sub2api_sub2api-network