2021-09-15 23:32:51 +03:00
|
|
|
#!/bin/bash
|
2021-07-11 12:53:33 +03:00
|
|
|
set -e
|
|
|
|
|
2021-09-15 23:36:33 +03:00
|
|
|
if [ ! -z "${CUSTOM_CERT}" ]; then
|
2021-09-15 23:20:08 +03:00
|
|
|
echo "Use custom certificate"
|
2021-09-15 22:53:18 +03:00
|
|
|
if [ ! -f /cert/private.key ]; then
|
2021-09-15 23:20:08 +03:00
|
|
|
echo "Generate new certificate"
|
2022-01-12 00:17:33 +03:00
|
|
|
rm -rf /cert
|
|
|
|
mkdir /cert
|
|
|
|
openssl req -newkey rsa:2048 -sha256 -nodes -keyout /cert/private.key -x509 -days 10000 -out /cert/public.pem -subj "/C=US/ST=Berlin/L=Berlin/O=my_org/CN=${WEBHOOK_HOST}"
|
2021-09-15 22:53:18 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-09-10 00:01:30 +03:00
|
|
|
sleep 10
|
2021-07-11 12:53:33 +03:00
|
|
|
aerich upgrade
|
2021-09-26 20:36:05 +03:00
|
|
|
python migrate.py
|
2021-09-15 22:53:18 +03:00
|
|
|
python main.py
|