Protect and speed up your python code with cython, gunicorn and docker.
docker build --no-cache --secret id=mysecret,src=secret-file -t flask-cython-gunicorn-docker:test .
As of Python 3.3, it is no longer necessary to use __init__.py
file, but cython still needs this file to identify modules.
docker run -it -p 3000:3000 --name=test --rm flask-cython-gunicorn-docker:test
docker exec -it test bash
nobody@ad11cd146bc8:/app$ ls
apis main.cpython-311m-x86_64-linux-gnu.so requirements.txt
nobody@ad11cd146bc8:/app$ ls apis
__init__.cpython-311m-x86_64-linux-gnu.so hello_world.cpython-311m-x86_64-linux-gnu.so