Skip to content

Commit 57345bf

Browse files
committed
feat(config): update example configuration files with placeholder bot token
- Replaced the example bot token in `.env.example`, `config.toml.example`, and documentation to a placeholder value for security reasons. - Improved clarity in the `env.md` documentation by ensuring consistent example values across configuration files. - This change enhances security practices by avoiding the exposure of real tokens in example configurations.
1 parent 1d7523a commit 57345bf

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# DEBUG=false # false, true
44
# LOG_LEVEL="INFO" # "INFO", "DEBUG", "WARNING", "ERROR"
5-
# BOT_TOKEN="" # "MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.AbCdEf.GhIjKlMnOpQrStUvWxYz1234567890"
5+
# BOT_TOKEN="" # "FakeDiscordBotTokenBecauseGitHubSecurityIsAnnoying"
66
# POSTGRES_HOST="localhost" # "localhost", "tux-postgres", "db.example.com"
77
# POSTGRES_PORT=5432 # 5432, 5433
88
# POSTGRES_DB="tuxdb" # "tuxdb", "tux_production"

config/config.toml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# BOT_TOKEN: string
2020
# Discord bot token
2121
# Default: ""
22-
# Examples: "MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.AbCdEf.GhIjKlMnOpQrStUvWxYz1234567890"
22+
# Examples: "FakeDiscordBotTokenBecauseGitHubSecurityIsAnnoying"
2323
# BOT_TOKEN = ""
2424

2525
# POSTGRES_HOST: string

docs/content/reference/env.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ Configuration is loaded from multiple sources in priority order:
2020
5. config.json file
2121
6. Default values (lowest priority)
2222

23-
| Name | Type | Default | Description | Example |
24-
|------------------------|-----------|-------------------------------------|-----------------------------------------------------------------------|----------------------------------------------------------------------|
25-
| `DEBUG` | `boolean` | `false` | Enable debug mode | `false`, `true` |
26-
| `LOG_LEVEL` | `string` | `"INFO"` | Logging level (TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL) | `"INFO"`, `"DEBUG"`, `"WARNING"`, `"ERROR"` |
27-
| `BOT_TOKEN` | `string` | `""` | Discord bot token | `"MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.AbCdEf.GhIjKlMnOpQrStUvWxYz1234567890"` |
28-
| `POSTGRES_HOST` | `string` | `"localhost"` | PostgreSQL host | `"localhost"`, `"tux-postgres"`, `"db.example.com"` |
29-
| `POSTGRES_PORT` | `integer` | `5432` | PostgreSQL port | `5432`, `5433` |
30-
| `POSTGRES_DB` | `string` | `"tuxdb"` | PostgreSQL database name | `"tuxdb"`, `"tux_production"` |
31-
| `POSTGRES_USER` | `string` | `"tuxuser"` | PostgreSQL username | `"tuxuser"`, `"tux_admin"` |
32-
| `POSTGRES_PASSWORD` | `string` | `"ChangeThisToAStrongPassword123!"` | PostgreSQL password | `"ChangeThisToAStrongPassword123!"`, `"SecurePassword456!"` |
33-
| `DATABASE_URL` | `string` | `""` | Custom database URL override | `"postgresql://user:password@localhost:5432/tuxdb"` |
34-
| `ALLOW_SYSADMINS_EVAL` | `boolean` | `false` | Allow sysadmins to use eval | `false`, `true` |
23+
| Name | Type | Default | Description | Example |
24+
|------------------------|-----------|-------------------------------------|-----------------------------------------------------------------------|-------------------------------------------------------------|
25+
| `DEBUG` | `boolean` | `false` | Enable debug mode | `false`, `true` |
26+
| `LOG_LEVEL` | `string` | `"INFO"` | Logging level (TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL) | `"INFO"`, `"DEBUG"`, `"WARNING"`, `"ERROR"` |
27+
| `BOT_TOKEN` | `string` | `""` | Discord bot token | `"FakeDiscordBotTokenBecauseGitHubSecurityIsAnnoying"` |
28+
| `POSTGRES_HOST` | `string` | `"localhost"` | PostgreSQL host | `"localhost"`, `"tux-postgres"`, `"db.example.com"` |
29+
| `POSTGRES_PORT` | `integer` | `5432` | PostgreSQL port | `5432`, `5433` |
30+
| `POSTGRES_DB` | `string` | `"tuxdb"` | PostgreSQL database name | `"tuxdb"`, `"tux_production"` |
31+
| `POSTGRES_USER` | `string` | `"tuxuser"` | PostgreSQL username | `"tuxuser"`, `"tux_admin"` |
32+
| `POSTGRES_PASSWORD` | `string` | `"ChangeThisToAStrongPassword123!"` | PostgreSQL password | `"ChangeThisToAStrongPassword123!"`, `"SecurePassword456!"` |
33+
| `DATABASE_URL` | `string` | `""` | Custom database URL override | `"postgresql://user:password@localhost:5432/tuxdb"` |
34+
| `ALLOW_SYSADMINS_EVAL` | `boolean` | `false` | Allow sysadmins to use eval | `false`, `true` |
3535

3636
### BotInfo
3737

src/tux/shared/config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Config(BaseSettings):
133133
default="",
134134
description="Discord bot token",
135135
examples=[
136-
"MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.AbCdEf.GhIjKlMnOpQrStUvWxYz1234567890",
136+
"FakeDiscordBotTokenBecauseGitHubSecurityIsAnnoying",
137137
],
138138
),
139139
]

0 commit comments

Comments
 (0)