From 20b1f77e9e62c3208b241751eac3128dc77934a8 Mon Sep 17 00:00:00 2001 From: aserrador Date: Mon, 6 Apr 2026 22:15:33 -0500 Subject: [PATCH] chore: update Docker and build config, fix typo, update submodules --- .dev/install_module.sh | 3 ++- .dev/run.sh | 1 + Dockerfile_Live | 17 +++++++++++++++-- Rakefile | 2 +- compose.live.yml | 1 + 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.dev/install_module.sh b/.dev/install_module.sh index 47e8357..cffb1a8 100644 --- a/.dev/install_module.sh +++ b/.dev/install_module.sh @@ -11,7 +11,7 @@ if [ -z "${DEVELOP}" ]; then fi if [ ${DEVELOP} = "True" ]; then - pip3 install --break-system-packages proteus==${TRYTOND_VERSION} + pip3 install --break-system-packages proteus==${TRYTOND_VERSION} trytond==${TRYTOND_VERSION} pip3 install --break-system-packages -r .dev/requirements_dev.txt fi @@ -19,6 +19,7 @@ fi pip3 install --break-system-packages -r requirements.txt pip3 install --break-system-packages trytond==${TRYTOND_VERSION} +pip install "python-sql<1.8" --break-system-packages official_modules=".dev/official_modules.txt" while IFS= read -r module; do diff --git a/.dev/run.sh b/.dev/run.sh index 13f3f5f..3623d19 100755 --- a/.dev/run.sh +++ b/.dev/run.sh @@ -19,6 +19,7 @@ source ${SCRIPT_DIR}/install_module.sh # inicializar base de datos # https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html + yes admin | trytond-admin -d ${DB_NAME} --all --act diff --git a/Dockerfile_Live b/Dockerfile_Live index 520167f..5211cad 100644 --- a/Dockerfile_Live +++ b/Dockerfile_Live @@ -9,11 +9,24 @@ RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - COPY naliia_sao_custom/sao.less /package/src/sao.less RUN cd /package && bower install --allow-root -FROM python:3.11-bullseye + +FROM debian:12-slim # trytond DB_CACHE requiere commandos `pg_dump` y `pg_restore` -RUN apt-get update && apt-get install -y postgresql-client +RUN apt-get update && apt-get install -y postgresql-client python3-pip + # TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile COPY --from=builder-node /package /var/lib/trytond/www COPY naliia_sao_custom/ /var/lib/trytond/www/ + +ARG TRYTONPASSFILE +ARG TRYTON_ADMIN_PASSWORD + +ENV TRYTONPASSFILE=/etc/trytond_admin_pass.conf + + +RUN touch /etc/trytond_populate.conf \ + && touch $TRYTONPASSFILE \ + && echo $TRYTON_ADMIN_PASSWORD >> $TRYTONPASSFILE \ + diff --git a/Rakefile b/Rakefile index 523a97c..327e7d5 100644 --- a/Rakefile +++ b/Rakefile @@ -125,7 +125,7 @@ namespace :git do end def compose(*arg, compose: DOCKER_COMPOSE) - sh "docker-compose -f #{compose} #{arg.join(' ')}" + sh "docker compose -f #{compose} #{arg.join(' ')}" end def refresh_cache diff --git a/compose.live.yml b/compose.live.yml index 01cdda1..8a1d95e 100644 --- a/compose.live.yml +++ b/compose.live.yml @@ -11,6 +11,7 @@ services: dockerfile: Dockerfile_Live args: TRYTOND_VERSION: ${TRYTOND_VERSION} + TRYTON_ADMIN_PASSWORD: ${TRYTON_ADMIN_PASSWORD:-admin} depends_on: - db command: bash .dev/run.sh