forked from 3wordchant/capsul-flask
add Configuration-type-stuff that lives in the database
This commit is contained in:
parent
bddf42b750
commit
617534cd1c
@ -34,6 +34,7 @@ Interested in learning more? How about a trip to the the `docs/` folder:
|
||||
- [With docker-compose](./docs/local-set-up.md#docker_compose)
|
||||
- [**Configuring `capsul-flask`**](./docs/configuration.md)
|
||||
- [Example configuration from capsul.org (production)](./docs/configuration.md#example)
|
||||
- [Configuration-type-stuff that lives in the database ](./docs/configuration.md#config_that_lives_in_db)
|
||||
- [Loading variables from files (docker secrets)](./docs/configuration.md#docker_secrets)
|
||||
- [**`capsul-flask`'s relationship to its Database Server**](./docs/database.md)
|
||||
- [Database schema management (schema versions)](./docs/database.md#schema_management)
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
The "Hub" runs the web application and talks to the Postrges database, while the "Spoke"s are responsible for creating/managing virtual machines. One instance of the capsul-flask application can run in hub mode and spoke mode at the same time.
|
||||
|
||||
The Hub and the Spoke must be configured to communicate securely with each-other over HTTPS. They both have to be able to dial each-other directly. The URLs / auth tokens they use are configured both in the config file (`HUB_URL`, `SPOKE_HOST_ID`, `SPOKE_HOST_TOKEN` and `HUB_TOKEN`) and in the database (the `id`, `https_url`, and `token` columns in the `hosts` table).
|
||||
|
||||
![](images/hub-and-spoke1.png)
|
||||
|
||||
This diagram was created with https://app.diagrams.net/.
|
||||
|
@ -63,6 +63,24 @@ BTCPAY_URL="https://beeteeceepae2.cyberia.club"
|
||||
BTCPAY_PRIVATE_KEY='-----BEGIN EC PRIVATE KEY-----\n<redacted>\n-----END EC PRIVATE KEY-----'
|
||||
```
|
||||
|
||||
## <a name="config_that_lives_in_db"></a>Configuration-type-stuff that lives in the database
|
||||
|
||||
- `hosts` table:
|
||||
- `id` (corresponds to `SPOKE_HOST_ID` in the config)
|
||||
- `https_url`
|
||||
- `token` (corresponds to `SPOKE_HOST_TOKEN` in the config)
|
||||
- `os_images` table:
|
||||
- `id`
|
||||
- `template_image_file_name`
|
||||
- `description`
|
||||
- `deprecated`
|
||||
- `vm_sizes` table:
|
||||
- `id`
|
||||
- `dollars_per_month`
|
||||
- `memory_mb`
|
||||
- `vcpus`
|
||||
- `bandwidth_gb_per_month`
|
||||
|
||||
## <a name="docker_secrets"></a>Loading variables from files (docker secrets)
|
||||
|
||||
To support [Docker Secrets](https://docs.docker.com/engine/swarm/secrets/), you can also load secret values from files – for example, to load `MAIL_PASSWORD` from `/run/secrets/mail_password`, set
|
||||
|
Loading…
Reference in New Issue
Block a user