-
Notifications
You must be signed in to change notification settings - Fork 10
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
Redesign of the service. #46
base: master
Are you sure you want to change the base?
Conversation
setup.py
Outdated
'waitress', | ||
'python-magic', | ||
] | ||
requires = ['Flask==1.0.3', 'gunicorn==19.0.0', 'WeasyPrint==47'] |
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.
je suis pas expert dans le sujet mais je pense qu'il faut cadrer dans setup.py. Une version trop explicite peut causer des soucis convertit a cote d'un paquet
Ex : j'installe convertit et un projet qui necessite weasyprint==46, pip laissera passer avec des alertes, piupenv refusera d'installer etc
Dockerfile
Outdated
libffi-dev \ | ||
shared-mime-info && \ | ||
rm -r /var/lib/apt/lists/* && \ | ||
pip3 install -e git+https://github.com/courtem/convertit.git@server#egg=convertit |
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.
la partie pip install est deja execute avec le fichier de requirements.
tu peux ajouter ton requirements depuis github en mettant directement:
-e git+https....
dans le requirements.txt
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.
je dis une betise : ton docker file devrait installer ta version locale
Dockerfile
Outdated
CMD bash -c "(soffice --nologo --nodefault \ | ||
--nofirststartwizard --invisible \ | ||
--headless --norestore --accept='socket,host=localhost,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext' &) && \ | ||
(gunicorn -b '0.0.0.0:8000' convertit.application:app)" |
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.
2 services dans 1 docker
C'est possible, c'est pas totalement fait pour
A voir avec gael mais j'aurai probablement d'abord publié une image docker qui expose le endpoint de soffice et un docker-compose qui orchestre tt çà
le paquet python convertit n'a pas explicitement besoin de soffice, juste d'une ip et d'un port pour s'y connecter
Apres, avec les dockerfile,
il vaut mieux garder la notation
CMD ["command", "--arg1", "--arg2" ]
et si jamais tu gardes les 2 services dans 1 docker, garde le pricnipe du script run.sh qui lance tes deux commandes
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.
et garder le EXPOSE du port a exposer par defaut
No description provided.