Add more information on database configuration, and allow using a .env file

This commit is contained in:
Alexis Métaireau 2023-10-18 02:37:00 +02:00
parent 824a0afa3e
commit bf24f87fd7
2 changed files with 10 additions and 3 deletions

View file

@ -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:

View file

@ -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