|
3 years ago | |
---|---|---|
bin | 4 years ago | |
doc | 4 years ago | |
project_amber | 3 years ago | |
.dockerignore | 4 years ago | |
.drone.yml | 3 years ago | |
.gitignore | 4 years ago | |
.pylintrc | 4 years ago | |
Dockerfile | 3 years ago | |
LICENSE.txt | 4 years ago | |
Pipfile | 3 years ago | |
Pipfile.lock | 3 years ago | |
README.md | 4 years ago | |
docker-compose.yml | 4 years ago | |
requirements.txt | 3 years ago | |
setup.cfg | 3 years ago | |
setup.py | 3 years ago |
README.md
Amber Backend
This is the backend app of Project Amber, a task list app.
This is a basic Flask/SQLAlchemy app that takes care of syncing tasks between devices.
Configuration
The config file is a JSON file that is loaded from either ./config.json
or
/etc/amber.json
, whichever is found first.
Example config:
{
"database": "sqlite:///file.db", // SQLAlchemy database URI
// see https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls
"allow_signup": false, // whether to allow /api/signup or not
"loglevel": 0, // 0: errors, 1: warnings, 2: info
"domain": "https://your.domain.tld" // full domain with HTTPS, needed for CORS
}
If there are environment variables AMBER_DATABASE
/ AMBER_ALLOW_SIGNUP
/
AMBER_LOGLEVEL
/ AMBER_DOMAIN
set, the program will respect them and use
over the values provided with the config file.
Dependencies
This app directly depends on flask
, flask-sqlalchemy
, flask-cors
, and
bcrypt
.
requirements.txt
is left only so that pipenv is not needed while building the
app in Docker. Please use pipenv in development.
Running in Docker
The Dockerfile included with the project assumes that:
- You're going to use either PostgreSQL or SQLite.
- You're going to run it behind a reverse proxy such as nginx (and running the app without a reverse proxy won't work because of the current uwsgi configuration).
If you have to/prefer to use MariaDB, etc, you'll have to add the necessary Python packages to the Docker image by hand. See SQLAlchemy docs for details.
Licenses
See LICENSE.txt.