adding the option to store environment variables in a text file :)

This commit is contained in:
mb 2022-10-30 15:28:03 +01:00
parent 03c315399b
commit 67fe8b0828
3 changed files with 24 additions and 10 deletions

View File

@ -1,7 +1,14 @@
SHELL := /bin/bash
default: run
setup:
@if [ ! -d ".venv" ]; then python3 -m venv .venv && .venv/bin/pip install -r requirements.txt; fi
run:
config:
@set -a
@source config.env
@set +a
run: config
@.venv/bin/python octomode.py

View File

@ -85,19 +85,22 @@ You can clone this repository to run octomode on your own computer or server.
Then you can configure your environment.
You can do this by passing the values on the command-line before running octomode:
You can do this in two ways:
* by editing the `config.env` file
* by storing the configuration settings as *environment variables* before running octomode:
```
export OCTOMODE_PORTNUMBER=XXX
export OCTOMODE_PAD_URL=XXX
export OCTOMODE_PAD_API_URL=XXX
export OCTOMODE_PAD_API_KEY=XXX
$ export OCTOMODE_PORTNUMBER=XXX
$ export OCTOMODE_PAD_URL=XXX
$ export OCTOMODE_PAD_API_URL=XXX
$ export OCTOMODE_PAD_API_KEY=XXX
```
- **OCTOMODE_PORTNUMBER**: optional, default: `5001`
- **OCTOMODE_PAD_URL**: optional, default: `https://pad.vvvvvvaria.org/`
- **OCTOMODE_PAD_API_URL**: optional, default: `https://pad.vvvvvvaria.org/api/1.2.15/`
- **OCTOMODE_PAD_API_KEY**: required, **no default**
- **OCTOMODE_PORTNUMBER**: *optional*, default: `5001`
- **OCTOMODE_PAD_URL**: *optional*, default: `https://pad.vvvvvvaria.org/`
- **OCTOMODE_PAD_API_URL**: *optional*, default: `https://pad.vvvvvvaria.org/api/1.2.15/`
- **OCTOMODE_PAD_API_KEY**: *required*, **no default**
(Note: You must provide a value for `OCTOMODE_PAD_API_KEY`.)

4
config.env Normal file
View File

@ -0,0 +1,4 @@
OCTOMODE_PORTNUMBER=XXX
OCTOMODE_PAD_URL=XXX
OCTOMODE_PAD_API_URL=XXX
OCTOMODE_PAD_API_KEY=XXX