Files
NaliiaDev/Dockerfile_Deploy
2026-01-18 16:13:30 -05:00

79 lines
2.0 KiB
Plaintext

# version Trytond server example 5.0
ARG TRYTOND_VERSION
FROM node as builder-node
ARG TRYTOND_VERSION
ARG TRYTONPASSFILE
ENV SERIES=${TRYTOND_VERSION}
RUN npm install -g bower
RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - -C /
COPY naliia_sao_custom/sao.less /package/src/sao.less
RUN cd /package && rm -rf dist && npm install --legacy-peer-deps && npx grunt && bower install --allow-root
FROM tryton/tryton:$TRYTOND_VERSION
# label custom
LABEL org.label-schema.version="$TRYTOND_VERSION"
ARG TRYTOND_VERSION
ARG DEVELOP
ARG WORKER
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
python3-click \
uwsgi \
uwsgi-plugin-python3 \
libreoffice
RUN echo "Install modules non official"
COPY trytond.conf /etc/trytond.conf
COPY trytond_worker.conf /etc/trytond_worker.conf
COPY gunicorn.conf.py /etc/gunicorn.conf.py
COPY requirements.txt /opt
RUN pip install --break-system-packages -r /opt/requirements.txt
COPY start.sh /opt
COPY trytond_logging.conf /etc/trytond_logging.conf
COPY trytond_cron_logging.conf /etc/trytond_cron_logging.conf
COPY trytond_worker_logging.conf /etc/trytond_worker_logging.conf
COPY common_password.txt /etc/common_password.txt
COPY modules /app/modules
COPY install_modules.sh /app/install_modules.sh
RUN chmod +x /app/install_modules.sh && /bin/bash /app/install_modules.sh
RUN rm -rf /var/lib/trytond/www
COPY --from=builder-node /package /var/lib/trytond/www
COPY naliia_sao_custom/ /var/lib/trytond/www/
ARG TRYTONPASSFILE
ENV TRYTONPASSFILE=/etc/trytond_admin_pass.conf
RUN touch /etc/trytond_populate.conf \
&& touch $TRYTONPASSFILE \
&& chown -R trytond:trytond /etc/trytond* \
&& rm -rf /var/log/trytond \
&& mkdir /var/log/trytond \
&& chown -R trytond:trytond /var/log/trytond \
&& rm -rf /mnt/attachment \
&& mkdir /mnt/attachment \
&& chown -R trytond:trytond /mnt/attachment
USER trytond
CMD ["/bin/bash"]