Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
/ plateypus-backend Public archive

Backend service for the Plateypus app

License

Notifications You must be signed in to change notification settings

Geologik/plateypus-backend

Repository files navigation

Plateypus Backend

Build Status Codecov Status Sonarcloud Status Updates Code style: black

Backend service for the Plateypus app.

Configuration

The Plateypus backend is configured using environment variables. User-controllable settings and their default values are:

Key Description Default
CACHE_DEFAULT_TIMEOUT Cache default timeout in seconds. 600
CACHE_REDIS_URL URL to connect to Redis server, e.g. redis://usr:pwd@localhost:6379/2. Only used if CACHE_TYPE is redis.
CACHE_TYPE Specifies which type of caching to use. See Configuring Flask-Caching for more information. Supported values are null, simple and redis. null
ELASTIC_HOST Base URL or IP of the Elasticsearch server to use. localhost
ELASTIC_PORT Elasticsearch server port. 9200
ELASTIC_PROTOCOL Elasticsearch server protocol. http
FLASK_ENV Controls whether the app is running in development or production mode. Supported values are development and production. production
FLASK_SECRET_KEY For session support, a secret key must be set. You may generate a new key with pipenv run keygen.
FLASK_TESTING Enable testing mode. Exceptions are propagated rather than handled by the the app's error handlers. Supported values are True and False (case-insensitive). False
LOG_LEVEL Minimum threshold for log messages. See Logging Levels. Must be explicitly given as an integer. 30 (i.e. WARNING)
LOG_OUTPUT If set, log messages will be appended to this file. A fully qualified path must be given.

CLI scripts

The project's Pipfile defines a number of scripts, which can be run in a command prompt by typing pipenv run <script>.

Script Description
debug Execute unit tests, dropping to the pdb debugger on the first error. Windows only.
elastic Start clean dockerized Elasticsearch server.
flask Start a local development server.
keygen Generate a key suitable for use with the FLASK_SECRET_KEY setting.
lint Run a chain of analysis tools and linters: isortblackpylintbandit.
test Execute unit tests and calculate code coverage. Windows only.

Releases

No releases published

Packages

No packages published

Languages