iScsc / iscsc.fr

The iScsc website, build with passion by wannabe devs 🔥
GNU General Public License v3.0
4 stars 12 forks source link

Refactor backend docker environment towards a python flask backend #88

Closed ctmbl closed 1 year ago

ctmbl commented 1 year ago

I simply refactored the Dockerfile and replace any use of node-* by backend-* or flask-*, for example for container name, env variable etc, I also added a requirements.txt for obvious reasons.

To go further: I chose flask as future python backend framework out of these propositions

Two parts of a DigitalOcean flask tutorial, we could find useful:

Currently the only thing that can be done is run the docker-compose command described in the README.md, without certificates (raw HTTP, after reverting #34 with git 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:

But all this will be work for other PRs to backend/python

:warning: IMPORTANT: i've read everywhere that the way I currently run the server (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)

amtoine commented 1 year ago

Note once we land #91 and the prettier pipeline is fixed, you can

git fetch iscsc
git merge iscsc/main
git push ctmbl

to resolve the conflicts if any @ctmbl :+1:

ctmbl commented 1 year ago

@amtoine ofc I'll do it, anyway the CI won't pass if I don't :+1: