-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
179 lines (150 loc) · 8.32 KB
/
Copy path.env.example
File metadata and controls
179 lines (150 loc) · 8.32 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# ==============================================================================
# 9Router Universal Token & Connection Synchronizer (9RTKSync)
# Environment Configuration Template
# ==============================================================================
# To configure your local or container environment:
# 1. Copy this file to .env: cp .env.example .env
# 2. Adjust values to match your infrastructure and credentials
# 3. The .env file is strictly ignored by version control (.gitignore)
# ==============================================================================
# ------------------------------------------------------------------------------
# 1. Storage and Token Discovery
# ------------------------------------------------------------------------------
# Host base directory mounted inside container (e.g. /root/host when mounted ${HOME}:/root/host:ro)
HOST_HOME=/root/host
# Absolute path to the 9Router SQLite database file
# Default inside 9Router container: /app/data/db/data.sqlite
DB_PATH=/app/data/db/data.sqlite
# Optional custom path for direct Antigravity OAuth credentials
# ANTIGRAVITY_TOKEN_PATH=/root/host/.gemini/oauth_creds.json
# Base directory for everything this container writes: the panel preferences
# database, the recovery credential and the log directory. Defaults to the
# directory of DB_PATH. Set it when the gateway database lives somewhere the
# synchronizer should not write to.
# DATA_DIR=/app/data
# Google OAuth client used to renew Antigravity / Gemini CLI credentials.
# Leave BOTH empty to let the synchronizer read them from the host credential
# file it discovers. Fill them in only for an isolated deployment that has no
# host credentials mounted. These are secrets: they belong in your .env, which
# is never committed, and never in this example file.
# GOOGLE_CLIENT_ID=
# GOOGLE_CLIENT_SECRET=
# ------------------------------------------------------------------------------
# 2. 9Router Gateway Connectivity
# ------------------------------------------------------------------------------
# Base URL of the 9Router gateway for diagnostic checks and integration
ROUTER_URL=http://9rtk-router:20128
# ------------------------------------------------------------------------------
# 3. Synchronization and Cron Scheduler Parameters
# ------------------------------------------------------------------------------
# Interval in seconds between synchronization passes and cron renewals (default: 300s / 5min)
SYNC_INTERVAL=300
# Margin in seconds before expiration to trigger proactive renewal (default: 900s / 15min).
# A token is only renewed once its remaining validity drops below this margin.
REFRESH_MARGIN=900
# Dedicated interval for the cron scheduler. Inherits SYNC_INTERVAL when omitted.
# CRON_INTERVAL=300
# Enable/disable the automatic scheduler (1=on, 0=off).
# With 0, synchronization only happens on manual trigger (--once or POST /api/sync).
CRON_ENABLED=1
# Execution module: all, antigravity, oauth, gemini
MODULE=all
# ------------------------------------------------------------------------------
# 4. Embedded Web Server and Admin Dashboard
# ------------------------------------------------------------------------------
# Enable the administrative web dashboard (1=enabled, 0=disabled)
ENABLE_WEB_DASHBOARD=1
# Network interface for the web dashboard server
WEB_HOST=0.0.0.0
# INTERNAL port of the web server inside the container (default: 9090).
# It is the same in both synchronizers; what differs is the port published on the
# host (9091 for 9RTKSync, 9092 for OminiRTKSync).
WEB_PORT=9090
# ------------------------------------------------------------------------------
# COMO ENTRAR NO PAINEL / HOW TO SIGN IN
# ------------------------------------------------------------------------------
# O painel pede usuario e senha. Preencha as DUAS linhas abaixo antes de subir a
# stack -- e so isso. Nao existe senha de fabrica: um valor fixo publicado na
# imagem seria uma credencial publica no instante em que a imagem e publicada.
#
# The panel asks for a user and a password. Fill in BOTH lines below before
# bringing the stack up. There is no factory password, on purpose.
DASHBOARD_USER=admin
DASHBOARD_PASSWORD=
# Deixou DASHBOARD_PASSWORD vazia? O container gera uma credencial de
# recuperacao no primeiro boot. Leia e entre com ela como usuario 'admin':
# docker exec 9rtk-sync cat /app/data/db/.dashboard_recovery
# Depois defina a sua senha pela tela.
#
# Com DASHBOARD_PASSWORD preenchida, o ambiente vira a fonte da verdade e a
# troca de senha pela tela e recusada com aviso -- mude aqui e recrie o
# container. Deixe-a vazia se preferir administrar a senha pela tela.
# Credencial de recuperacao (break-glass). Se ficar vazia, um valor aleatorio e
# gerado no primeiro boot, salvo em .dashboard_recovery (modo 0600) e o log
# registra o ARQUIVO, nunca o valor. Continua valendo depois de definir a senha:
# uma credencial de socorro que caduca ao definir a senha e inutil justamente
# quando e necessaria.
# DASHBOARD_RECOVERY_HASH=
# ------------------------------------------------------------------------------
# ENTRADA FEDERADA (SSO) / SINGLE SIGN-ON
# ------------------------------------------------------------------------------
# O SSO e OPCIONAL e nasce desligado: sem configuracao, o painel funciona
# exatamente como hoje. O resto da configuracao (emissor, identificador do
# cliente, lista de quem pode entrar) e feito pela tela, no botao Configuracoes.
#
# Single sign-on is OPTIONAL and starts off. Everything but the secret below is
# configured from the screen, under the Settings button.
# Segredo do cliente OIDC. O ambiente VENCE o arquivo gravado pela tela: com
# esta variavel preenchida, o campo da tela fica travado. Vazia aqui de
# proposito -- um valor publicado num arquivo de exemplo e uma credencial
# publica. Deixe-a vazia para administrar o segredo pela tela, que o grava em
# .sso_client_secret com modo 0600.
OIDC_CLIENT_SECRET=
# Interruptor de emergencia. Com 1, o SSO fica desligado mesmo com tudo
# configurado, sem tocar no banco -- e o que devolve o formulario local quando o
# provedor de identidade cai e o painel esta atras de um tunel.
# SSO_DISABLED=0
# ------------------------------------------------------------------------------
# Persistent file log
# ------------------------------------------------------------------------------
# Directory for log files. Default: <database directory>/logs.
LOG_DIR=/app/logs
# Retention in days before rotated files are purged (default: 30).
LOG_RETENTION_DAYS=30
# Minimum level recorded: DEBUG, INFO, WARNING or ERROR (default: INFO).
LOG_LEVEL=INFO
# Mirror events on the container stdout as well (1=yes, 0=no).
LOG_TO_STDOUT=1
# ------------------------------------------------------------------------------
# 5. 9Router Stack Integration (Docker Compose)
# ------------------------------------------------------------------------------
# Initial credentials and JWT secret for 9Router.
# Both are REQUIRED and intentionally shipped empty: a value published in an
# example file is a public credential, and it becomes the real password of
# every deployment that copied the file. `docker compose up` refuses to start
# until you fill them in.
# INITIAL_PASSWORD -> at least 12 characters, generated, not typed
# JWT_SECRET -> openssl rand -hex 32
INITIAL_PASSWORD=
JWT_SECRET=
REQUIRE_API_KEY=false
REQUIRE_LOGIN=false
# --- Validacao viva de credenciais -----------------------------------------
# Pergunta a cada provedor se a chave/token ainda e aceito, em vez de assumir
# que uma conexao esta saudavel so por carregar uma credencial.
CREDENTIAL_CHECK_ENABLED=1
CREDENTIAL_CHECK_TIMEOUT=8
# --- Acesso remoto (opcional) ------------------------------------------------
# Só têm efeito quando você sobe o perfil correspondente:
# docker compose --profile tunel up -d
# docker compose --profile tailnet up -d
# Leia docs/wiki/Remote-Access.md ANTES de ligar qualquer um dos dois: com a
# porta em 127.0.0.1 o painel só é alcançado por esta máquina, e um túnel
# inverte isso.
# Vazio = quick tunnel da Cloudflare: URL nova a cada subida, pública para quem
# a tiver. Preenchido com o token de um túnel nomeado = URL estável e a
# possibilidade de pôr o Cloudflare Access na frente.
TUNNEL_TOKEN=
# Chave efêmera gerada em https://login.tailscale.com/admin/settings/keys
# (efêmera para o nó sumir sozinho quando o contêiner morrer).
TS_AUTHKEY=