Compare commits

...

3 commits

Author SHA1 Message Date
Ada
e61eaa291b remove(lint): deprecated format option
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
2023-10-01 13:19:37 +02:00
Ada
6cee95c077 fix(backend: config): bad variable name for redis port 2023-10-01 13:19:36 +02:00
Ada
3448294314 add: readme 2023-10-01 13:19:21 +02:00
3 changed files with 12 additions and 2 deletions

11
README.md Normal file
View file

@ -0,0 +1,11 @@
# A code share paste
## Run
Require redis and python, install python requirements with `pip install -r requirements.txt`. Run with `flask --app paste run` (add `--debug` for devlopement)
You can configure with multiple environnement variables.
- PASTE_REDIS_HOST: redis host (default localhost)
- PASTE_REDIS_PORT: redis port (default 6379)
- PASTE_REDIS_USER: redis username (default none)
- PASTE_REDIS_PASSWORD: redis password (default none)
- PASTE_URL_LENGTH: length for url used by paste
- PASTE_SECRET_KEY: secret key for flask, don't use the default value (generate a safe value with `openssl rand -hex 16`).

View file

@ -2,7 +2,7 @@
from os import getenv from os import getenv
REDIS_HOST = getenv("PASTE_REDIS_HOST") or "localhost" REDIS_HOST = getenv("PASTE_REDIS_HOST") or "localhost"
REDIS_PORT = getenv("PASTE_REDIS_HOST") or "6379" REDIS_PORT = getenv("PASTE_REDIS_PORT") or "6379"
REDIS_USER = getenv("PASTE_REDIS_USER") or None REDIS_USER = getenv("PASTE_REDIS_USER") or None
REDIS_PASSWORD = getenv("PASTE_REDIS_PASSWORD") or None REDIS_PASSWORD = getenv("PASTE_REDIS_PASSWORD") or None
URL_LENGTH = getenv("PASTE_URL_LENGTH") or 4 URL_LENGTH = getenv("PASTE_URL_LENGTH") or 4

View file

@ -59,7 +59,6 @@ exclude = [
"instances", "instances",
"schema.sql" "schema.sql"
] ]
format = "grouped"
[tool.isort] [tool.isort]
profile = "black" profile = "black"