A minimal flask app to test membrane.
- Clone the repository:
git clone https://github.com/ai-cfia/flask-example.git- Open in devcontainer.
Alternatively,
- Clone the repository:
git clone https://github.com/ai-cfia/flask-example.git
cd flask-example- Create a virtual environment:
python -m venv venv
source venv/bin/activate- Install the dependencies:
pip install -r requirements.txtCreate 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