Synology Package Repository
poetry installpoetry shellpython manage.py db createpython manage.py db populatepython manage.py user create -u Admin -e [email protected] -p adminadminpython manage.py user add_role -u [email protected] -r adminpython manage.py user add_role -u [email protected] -r package_adminpython manage.py user add_role -u [email protected] -r developerTo reset the environment, clean up with python manage.py clean.
python manage.py runserverpoetry run pytest -vCreate a config file ./config.py to disable debug logs, connect to a database, set a secure key and optionally set a cache:
Use LC_CTYPE=C tr -cd '[:print:]' < /dev/urandom | head -c 64 or base64 < /dev/urandom | head -c 64 to get a random string
DEBUG = False
TESTING = False
SECRET_KEY = "Please-change-me-to-some-random-string"
SQLALCHEMY_ECHO = False
SQLALCHEMY_DATABASE_URI = "postgresql://user:pass@localhost/dbname"
# https://pythonhosted.org/Flask-Caching/#configuring-flask-caching
CACHE_TYPE= "simple"
# For signing packages
GNUPG_PATH= "/usr/local/bin/gpg"
Example usage:
docker run -it --rm --name spkrepo -v $(pwd)/data:/data -v $(pwd)/docker-config.py:/usr/src/app/spkrepo/config.py -p 8000:8000 synocommunity/spkrepo
Example:
pip install gunicorn
SPKREPO_CONFIG="$PWD/config.py" gunicorn -w 4 'wsgi:app'
Content type
Image
Digest
Size
363.8 MB
Last updated
over 5 years ago
docker pull synocommunity/spkrepo