A minimal flask app to test membrane.
git clone https://github.com/ai-cfia/flask-example.git
Alternatively,
git clone https://github.com/ai-cfia/flask-example.git
cd flask-example
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Create and set the environment variables based on .env.template
.
flask run -h 0.0.0.0 --debug
curl -X GET http://localhost:5000/health"
Expect: ok
.
curl -X GET http://localhost:5000/"
Expect to be redirected to membrane-frontend
if you haven't logged in yet, Hello, {user}!
if you have.
Create and set the environment variables based on .env.template
.
Build (do this from your WSL Ubuntu where Docker is already installed):
docker build -t flask-example .
test locally:
export PORT=<your_port_here>
docker run -v $(pwd)/keys:/app/keys -p $PORT:$PORT -e PORT=$PORT --env-file .env flask-example