feat: Add deploy system

This commit is contained in:
2026-01-16 15:27:07 -05:00
parent edd715b444
commit 80a8314b55
14 changed files with 402111 additions and 1 deletions

26
start.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env sh
if [ -s /etc/trytond_populate.conf ]; then
if [ "$DEVELOP" == "True" ]; then
if [ "$WORKER" == "True" ]; then
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
# trytond-worker -c /etc/trytond.conf -d miac --dev --logconf /etc/trytond_worker_logging.conf
else
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf
fi
elif [ "$WORKER" == "True" ]; then
# trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
# trytond-worker -c /etc/trytond.conf -d miac --logconf /etc/trytond_worker_logging.conf &
gunicorn --config=/etc/gunicorn.conf.py
else
gunicorn --config=/etc/gunicorn.conf.py
fi
else
sleep $SLEEP_TRYTOND_ADMIN && echo $TRYTONADMINPASS > $TRYTONPASSFILE
trytond-admin -c /etc/trytond.conf -d $POSTGRES_DB --all --email $EMAIL -vv
echo "1" > /etc/trytond_populate.conf && /bin/bash /opt/start.sh
fi