Created during the first B360R070N session.
c4p2n (Call For Paper To Notion) is a webhook to submit dasta about the talk from TypeForm to our Notion.
Use Docker to run c4p2n.
First, build an image from the project root:
docker build -t %TAG_NAME% .
where %TAG_NAME%
is something you'd like to tag your Docker image.
Now, you're go to go, run it:
docker run -it -d --name %CONTAINER_NAME% -p %PORT%:8000 %TAG_NAME%
where %CONTAINER_NAME%
is something you'd like to name your Docker container,
%PORT%
is a port you want to publish the app on, and %TAG_NAME%
is the tag name
from the previous step.
This way you can run c4p2n as a separate app, proxy it with nginx or do anything one can with a web application.
We run it in a FaaS fashion on kintohub
We use Poetry for dependencies management.
To install dependencies from the project root run:
poetry install
For development purposes, you can skip the Docker part to not to bother with all those fancy production accoutrements, and just use the run script:
sh run-app.sh [WORKERS_NUM] [PORT]
where WORKERS_NUM
and PORT
are optional and so far positional arguments,
so, beware.
If you want to reduce the overhead even more you can run the app with uvicorn:
uvicorn c4p2n.api:app
Now the app is up and running and you can find the OpenAPI schema at http://localhost:8000/redoc for redoc and http://localhost:8000/docs for swagger.
Currently we use mypy and black.
TODO link to CONTRBUTING.md