Update DESIGN.md

pull/191/head
Rui Carmo 2021-03-07 19:48:47 +00:00 zatwierdzone przez GitHub
rodzic 65e51b1681
commit 93ec724f30
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -16,11 +16,12 @@ An app is simply a `git` repository with some additional files on the top level,
### `Procfile` format
`piku` recognizes three kinds of process declarations in the `Procfile`:
`piku` recognizes five kinds of process declarations in the `Procfile`:
* `wsgi` workers, in the format `dotted.module:entry_point` (Python-only)
* `web` workers, which can be anything that honors the `PORT` environment variable
* `static` workers, which simply mount the first argument as the root static path
* `cron` workers, which require a simplified `cron` expression preceding the command to be run (e.g. `cron: */5 * * * * python batch.py` to run a batch every 5 minutes)
* `worker` processes, which are standalone workers and can have arbitrary names
So a Python application could have a `Procfile` like such:
@ -29,6 +30,8 @@ So a Python application could have a `Procfile` like such:
wsgi: module.submodule:app
worker: python long_running_script.py
fetcher: python fetcher.py
# Simple cron expression: minute [0-59], hour [0-23], day [0-31], month [1-12], weekday [1-7] (starting Monday, no ranges allowed on any field)
cron: 0 0 * * * python midnight_cleanup.py
```
...whereas a generic app would be: