Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ SENTRY_DSN=''
# Sentry DSN for mit-tab servers
MITTAB_SENTRY_DSN=''

# Optional: if set, this is injected into all deployed tournaments
BOARD_PASSWORD=''

# If you want to test the domain config, change this to a domain
# you control and have managed by DigitalOcean. Otherwise, remove if from
# the file
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ uv insall
## Environment Variables

Copy `.env.example` to `.env` and fill in the necessary values.
If you want deployed tournaments to receive `BOARD_PASSWORD` at startup, set
`BOARD_PASSWORD` in the deployer environment.

## Running

Expand Down
6 changes: 6 additions & 0 deletions deployer/clients/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ def env_var(key, value, is_secret=False):
"domains": []
}

board_password = os.environ.get("BOARD_PASSWORD")
if board_password:
base_config["envs"].append(env_var("BOARD_PASSWORD", board_password, True))
else:
logger.warning("BOARD_PASSWORD is not set; tournament deployment will not include BOARD_PASSWORD")

if os.environ.get("NU_TAB_DOMAIN"):
base_config["domains"].append(
{
Expand Down