The backend app of Project Amber, a task list app
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
Timur Demin b5cb76baa0
Merge branch 'develop'
2 miesięcy temu
bin Add an example docker-compose config 9 miesięcy temu
doc BREAKING: switch to versioned API URI scheme 3 miesięcy temu
project_amber Bump v0.0.4 2 miesięcy temu
.dockerignore Make the app run with Docker 9 miesięcy temu
.drone.yml Update Drone config 2 miesięcy temu
.gitignore Add VSCode dev internals to gitignore 3 miesięcy temu
.pylintrc Stop pylint from complaining on code that is easy to read 3 miesięcy temu
Dockerfile Improve caching 3 miesięcy temu
LICENSE.txt Initial commit 10 miesięcy temu
Pipfile Remove Python version requirement from Pipfile 3 miesięcy temu
Pipfile.lock Fixup 46251d75c44cfe95c0fe2852ef86418ca1adbb9b 3 miesięcy temu
README.md Migrate to pipenv for dependency management 3 miesięcy temu
docker-compose.yml Add an example docker-compose config 9 miesięcy temu
requirements.txt Update dependencies 3 miesięcy temu
setup.cfg Update yapf settings to follow pylint config 2 miesięcy temu
setup.py Bump v0.0.4 2 miesięcy temu

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:

  1. You're going to use either PostgreSQL or SQLite.
  2. 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.