1
0
Fork 0
mirror of synced 2024-06-01 18:20:18 +12:00
budibase/hosting/single/runner.sh

25 lines
785 B
Bash
Raw Normal View History

2022-04-01 13:00:52 +13:00
redis-server --requirepass $REDIS_PASSWORD &
/opt/clouseau/bin/clouseau &
/minio/minio server /data/minio &
2022-04-01 13:00:52 +13:00
/docker-entrypoint.sh /opt/couchdb/bin/couchdb &
2022-06-23 00:38:33 +12:00
/etc/init.d/nginx restart
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
2022-06-23 00:57:46 +12:00
# Add monthly cron job to renew certbot certificate
echo -n "* * 2 * * root exec /app/letsencrypt/certificate-renew.sh ${CUSTOM_DOMAIN}" >> /etc/cron.d/certificate-renew
chmod +x /etc/cron.d/certificate-renew
# Request the certbot certificate
2022-06-23 00:38:33 +12:00
/app/letsencrypt/certificate-request.sh ${CUSTOM_DOMAIN}
fi
2022-04-01 13:00:52 +13:00
/etc/init.d/nginx restart
pushd app
pm2 start --name app "yarn run:docker"
popd
pushd worker
pm2 start --name worker "yarn run:docker"
popd
sleep 10
2022-06-23 00:38:33 +12:00
curl -X PUT ${COUCH_DB_URL}/_users
curl -X PUT ${COUCH_DB_URL}/_replicator
2022-06-23 01:38:45 +12:00
sleep infinity