Skip to content
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

Merged
merged 8 commits into from
Apr 14, 2023

Conversation

ctmbl
Copy link
Contributor

@ctmbl ctmbl commented Apr 12, 2023

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

⚠️ 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)

@ctmbl ctmbl self-assigned this Apr 12, 2023
@ctmbl ctmbl added Priority: High The Issue must be addressed as soon as possible Severity: Critical The bug or Issue prevent the website from running or present a critical security issue backend about the website backend (endpoints, API,...) refactoring labels Apr 12, 2023
Copy link
Contributor

@atxr atxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nitpicking 🙂

.env.example Outdated Show resolved Hide resolved
Copy link
Contributor

@atxr atxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@amtoine
Copy link
Member

amtoine commented Apr 14, 2023

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 👍

@ctmbl
Copy link
Contributor Author

ctmbl commented Apr 14, 2023

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

amtoine and others added 3 commits April 15, 2023 01:08
iScsc#91)

* remove the `with` block under `actions/checkout@v3`

* TEST: break the formatting of the JS source

* Revert "TEST: break the formatting of the JS source"

This reverts commit 9d52551.
@ctmbl ctmbl merged commit 9e4cd0f into iScsc:backend/python Apr 14, 2023
@ctmbl ctmbl deleted the backend-python/docker branch April 14, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend about the website backend (endpoints, API,...) Priority: High The Issue must be addressed as soon as possible refactoring Severity: Critical The bug or Issue prevent the website from running or present a critical security issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants