| # debian.sh --arch 'amd64' out/ 'trixie' '@1785715200' |
| RUN groupadd -r trytond && useradd --no-log-init -r -d /var/lib/trytond -m -g trytond trytond && mkdir /var/lib/trytond/db && chown trytond:trytond /var/lib/trytond/db && mkdir /var/lib/trytond/www && mkdir -p /etc/python3 && echo "[DEFAULT]\nbyte-compile = standard, optimize" > /etc/python3/debian_config |
| RUN apt-get update && apt-get install -y --no-install-recommends curl python3 python3-pip python3-setuptools python3-wheel gunicorn python3-argcomplete bash-completion graphviz python3-magic && rm -rf /var/lib/apt/lists/* |
| RUN mkdir -p /etc/bash_completion.d && activate-global-python-argcomplete |
| COPY pip-constraints.txt* /root/pip-constraints.txt |
| RUN export PIP_CONSTRAINT=/root/pip-constraints.txt && touch /root/pip-constraints.txt && pip3 install --break-system-packages --no-cache-dir "trytond[PostgreSQL,Levenshtein,barcode,coroutine,email-validation,html2text,image,mjml,qrcode,weasyprint] == ${SERIES}.*" "psycopg[pool,binary] >= 3" "proteus == ${SERIES}.*" && for module in `curl -L https://downloads.tryton.org/${SERIES}/modules.txt`; do pip3 install --break-system-packages --no-cache-dir "trytond_${module} == ${SERIES}.*" || exit 1; done && pip3 install --break-system-packages --no-cache-dir pwdlib[bcrypt] phonenumberslite pycountry python-stdnum[SOAP] schwifty && python3 -m compileall -r 10 -o 1 -q |
| COPY --from=builder-node /package /var/lib/trytond/www |
| COPY entrypoint.sh / |
| COPY trytond.conf /etc/trytond.conf |
| COPY gunicorn.conf.py /etc/gunicorn.conf.py |
| LABEL org.label-schema.version= |
| ARG TRYTOND_VERSION=8.0 |
| ARG GITEA_USER=aserrador |
| ARG GITEA_PASSWORD=3sh0r4d3s3gu1r |
| ARG GITEA_DOMAIN=gitea.onecluster.org |
| ARG FACHO_BRANCH=feature/python-3.13-compat |
| ARG DEVELOP |
| ARG WORKER |
| USER root |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c apt-get update && apt-get install -y --no-install-recommends git python3-click uwsgi uwsgi-plugin-python3 libreoffice # buildkit |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c echo "Install modules non official" # buildkit |
| COPY ./prod/trytond.conf /etc/trytond.conf # buildkit |
| COPY ./prod/trytond_worker.conf /etc/trytond_worker.conf # buildkit |
| COPY ./prod/gunicorn.conf.py /etc/gunicorn.conf.py # buildkit |
| COPY ./prod/trytond_logging.conf /etc/trytond_logging.conf # buildkit |
| COPY ./prod/trytond_cron_logging.conf /etc/trytond_cron_logging.conf # buildkit |
| COPY ./prod/trytond_worker_logging.conf /etc/trytond_worker_logging.conf # buildkit |
| COPY ./prod/common_password.txt /etc/common_password.txt # buildkit |
| COPY ./prod/start.sh /opt # buildkit |
| COPY requirements.txt /opt # buildkit |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c pip3 install git+https://${GITEA_USER}:${GITEA_PASSWORD}@${GITEA_DOMAIN}/OneTeam/oc-facho.git@$FACHO_BRANCH --break-system-packages # buildkit |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c pip install --break-system-packages -r /opt/requirements.txt # buildkit |
| COPY modules /app/modules # buildkit |
| COPY ./prod/install_modules.sh /app/install_modules.sh # buildkit |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c chmod +x /app/install_modules.sh && /bin/bash /app/install_modules.sh # buildkit |
| RUN |7 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= /bin/sh -c rm -rf /var/lib/trytond/www # buildkit |
| COPY /package /var/lib/trytond/www # buildkit |
| ARG TRYTONPASSFILE |
| ARG TRYTON_ADMIN_PASSWORD |
| ENV TRYTONPASSFILE=/etc/trytond_admin_pass.conf |
| RUN |9 TRYTOND_VERSION=8.0 GITEA_USER=aserrador GITEA_PASSWORD=3sh0r4d3s3gu1r GITEA_DOMAIN=gitea.onecluster.org FACHO_BRANCH=feature/python-3.13-compat DEVELOP= WORKER= TRYTONPASSFILE=/etc/trytond_admin_pass.conf TRYTON_ADMIN_PASSWORD= /bin/sh -c touch /etc/trytond_populate.conf && touch $TRYTONPASSFILE && echo $TRYTON_ADMIN_PASSWORD >> $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 # buildkit |
| USER trytond |
| CMD ["/bin/bash"] |