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

Redesign of the service. #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Redesign of the service. #46

wants to merge 2 commits into from

Conversation

courtem
Copy link

@courtem courtem commented Jul 3, 2019

No description provided.

@courtem
Copy link
Author

courtem commented Jul 3, 2019

@gutard

@courtem
Copy link
Author

courtem commented Jul 3, 2019

@submarcos

setup.py Outdated
'waitress',
'python-magic',
]
requires = ['Flask==1.0.3', 'gunicorn==19.0.0', 'WeasyPrint==47']
Copy link
Member

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
Copy link
Member

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

Copy link
Member

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)"
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants