Marc-AntoineA 68ac135fc1 test(server): add a new test_hull api test 2 years ago
..
scripts 885ffab585 feat: create and commit tags, handle png/jpg for preview 2 years ago
tests 68ac135fc1 test(server): add a new test_hull api test 2 years ago
.env.example cfacf44d08 feat: basic token authentication on server 2 years ago
.gitignore dce45aea73 feat(back): vectorisation in progress 3 years ago
README.md b68beee4c2 feat(server): create basic test infrastructure for backend 2 years ago
__init__.py b68beee4c2 feat(server): create basic test infrastructure for backend 2 years ago
dockerfile 68a05a8f4a feat(server): dockerization seems to work! 2 years ago
main.py 276cd705f1 test(server): create one test for each api endpoint. Enough to detect bug? 2 years ago
requirements.txt 68a05a8f4a feat(server): dockerization seems to work! 2 years ago
wsgi.py 25b7300329 fix(server): docker image was broken due to undefined 'application' in wsgi file 2 years ago

README.md

Server

Code to run backtivisda script in the server

Requirements

  • images_manipulator and all its dependencies (version 0.0.2)
  • Install requirements.txt

    pip install -r requirements.txt
    

Getting Started

Environment Variables

Create .env file with:

  • SECRET_KEY
  • USERS : the list of the authenticated users

Developement

export FLASK_APP=main;flask run --port 4000 --debugger --reload

Create tokens for your users:

Script scripts/create_token.py

Production

sudo docker build -t aktivisdaserver:latest .
sudo docker run -p 4000:4000 -t aktivisdaserver:latest

Add to your nginx conf:

client_max_body_size 10M;

Test

pytest is required

pytest