-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor backend docker environment towards a python flask backend #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nitpicking 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
@amtoine ofc I'll do it, anyway the CI won't pass if I don't 👍 |
This merge is needed to get the CI fix from iScsc#91
I simply refactored the
Dockerfile
and replace any use ofnode-*
bybackend-*
orflask-*
, for example for container name, env variable etc, I also added arequirements.txt
for obvious reasons.To go further:
I chose
flask
as future python backend framework out of these propositionsTwo parts of a DigitalOcean
flask
tutorial, we could find useful:flask
app part 1/13flask
part 8/13Currently the only thing that can be done is run the
docker-compose
command described in theREADME.md
, without certificates (raw HTTP, after reverting #34 withgit revert 8087def
for example), and it builds and run without errors. Of course, none of the endpoints the frontend try to reach are currently implemented, it doesn't even use the right port, but this setup the environment to build upon!We have 3 solutions described to configure the port:
flask
env var on StackOveflow or on DigitalOcean's tuto --> the one we should use according to meapp.py
in python (doesn't useflask
CLI) --> reliable but seems like a hacky solution 🤷But all this will be work for other PRs to
backend/python
flask run
) is not the proper way to do it in production, will have to investigate further! (for example serve flask with Gunicorn and Nginx)