enable logging and development optional mode

This commit is contained in:
Alnus Tmp 2022-01-17 17:19:33 +00:00
parent d736198958
commit 4acb25e7c2
2 changed files with 24 additions and 0 deletions

View File

@ -35,4 +35,16 @@ RUN echo "Install modules non official"
COPY trytond-modules_non_official.sh /tmp/trytond-modules_non_official.sh
RUN cd /tmp/ \
&& bash trytond-modules_non_official.sh
##Enabled loggings
#COPY trytond_logging.conf /etc/trytond_logging.conf
#COPY uwsgi.conf /etc/uwsgi.conf
#RUN chown -R trytond:trytond /etc/trytond_logging.conf \
# && mkdir /var/log/trytond \
# && chown -R trytond:trytond /var/log/trytond
#ENV TRYTOND_LOGGING_CONFIG=/etc/trytond_logging.conf
#ENV TRYTOND_LOGGING_LEVEL=40
##Running in development mode (must enabled loggings)
#CMD ["trytond", "-c", "/etc/trytond.conf", "-vv", "--dev", "--logconf", "/etc/trytond_logging.conf"]
USER trytond

12
uwsgi.conf Normal file
View File

@ -0,0 +1,12 @@
[uwsgi]
http-socket=0.0.0.0:8000
plugins=python3
env=TRYTOND_CONFIG=$(TRYTOND_CONFIG)
env=TRYTOND_DATABASE_URI=$(TRYTOND_DATABASE_URI)
##Enabla loggings
#env=TRYTOND_LOGGING_CONFIG=$(TRYTOND_LOGGING_CONFIG)
#env=TRYTOND_LOGGING_LEVEL=$(TRYTOND_LOGGING_LEVEL)
env=PYTHONOPTIMIZE=$(PYTHONOPTIMIZE)
wsgi=trytond.application:app
processes=1
threads=4