diff --git a/.env.example b/.env.example index 033789a..f53aca5 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ ARGOS_YAML_FILE = "my-config.yaml" ARGOS_DATABASE_URL = "postgresql://argos:argos@localhost/argos" -DB_POOL_SIZE = 10 +DB_POOL_SIZE = 10 # https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.pool_size DB_MAX_OVERFLOW = 20 \ No newline at end of file diff --git a/docs/cli.md b/docs/cli.md index 5427c9c..4062581 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -46,10 +46,10 @@ Usage: argos agent [OPTIONS] SERVER AUTH Usage: argos agent https://argos.server "auth-token-here" - Alternatively, you can use the following environment variables to avoid passing - arguments to the agent on the command line: - ARGOS_AGENT_SERVER_URL=https://argos.server - ARGOS_AGENT_TOKEN=auth-token-here + Alternatively, you can use the following environment variables to avoid + passing arguments to the agent on the command line: + ARGOS_AGENT_SERVER_URL=https://argos.server ARGOS_AGENT_TOKEN=auth-token- + here Options: --max-tasks INTEGER Number of concurrent tasks this agent can run @@ -75,8 +75,8 @@ Options: --help Show this message and exit. Commands: - clean Clean the database (to run routinely) - start Starts the server. + cleandb Clean the database (to run routinely) + start Starts the server. ``` ```man -Usage: argos server clean [OPTIONS] +Usage: argos server cleandb [OPTIONS] Clean the database (to run routinely) @@ -119,7 +119,7 @@ Usage: argos server clean [OPTIONS] been locked for too long. Options: - --max-results INTEGER Maximum number of results to keep + --max-results INTEGER Number of results per tasks to keep --max-lock-seconds INTEGER The number of seconds after which a lock is considered stale --help Show this message and exit. diff --git a/docs/configuration.md b/docs/configuration.md index bfb759d..a8e4576 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -13,6 +13,33 @@ caption: .env --- ``` +### Environment variables + +Here are the environment variables you can define to configure how the service will behave : + +#### ARGOS_YAML_FILE + +The path to the yaml configuration file, defining the checks. + +#### ARGOS_DATABASE_URL + +The database url, as defined [in SQLAlchemy docs](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls). + +For instance, to connect to a postgres database on localhost with user, pass and dbname "argos": + +``` +ARGOS_DATABASE_URL = "postgresql://argos:argos@localhost/argos" +``` + +#### DB_POOL_SIZE +#### DB_MAX_OVERFLOW + +These two help you configure the size of the pool, and the max overflow (until when do we accept a new connection ?) These are documented [in the SQLAlchemy docs in greater details](https://docs.sqlalchemy.org/en/20/core/pooling.html#sqlalchemy.pool.QueuePool.params.pool_size) + +```bash +DB_POOL_SIZE = 10 +DB_MAX_OVERFLOW = 20 +``` ## Checks configuration