mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 09:52:38 +02:00
Add more information on database configuration, and allow using a .env file
This commit is contained in:
parent
824a0afa3e
commit
bf24f87fd7
2 changed files with 10 additions and 3 deletions
11
README.md
11
README.md
|
@ -39,13 +39,20 @@ source venv/bin/activate
|
|||
pip install -e .
|
||||
```
|
||||
|
||||
Once all the dependencies are in place, here is how to run the server:
|
||||
Then, you can run the server:
|
||||
|
||||
```bash
|
||||
argos server
|
||||
```
|
||||
|
||||
The server will read a `config.yaml` file at startup, and will populate the tasks specified in it. See the configuration section below for more information on how to configure the checks you want to run.
|
||||
You can specify the environment variables to configure the server, or you can put them in an `.env` file:
|
||||
|
||||
```bash
|
||||
ARGOS_DATABASE_URL=postgresql://localhost/argos
|
||||
ARGOS_YAML_FILE=config.yaml
|
||||
```
|
||||
|
||||
The server will read a `yaml` file at startup, and will populate the tasks specified in it. See the configuration section below for more information on how to configure the checks you want to run.
|
||||
|
||||
And here is how to run the agent:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ from argos.schemas.config import Config
|
|||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_prefix="argos_")
|
||||
model_config = SettingsConfigDict(env_prefix="argos_", env_file=".env")
|
||||
app_env: str
|
||||
database_url: str
|
||||
yaml_file: str
|
||||
|
|
Loading…
Reference in a new issue