feat: Add deploy system
This commit is contained in:
26
start.sh
Normal file
26
start.sh
Normal 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
|
||||
Reference in New Issue
Block a user