Skip to content

Commit

Permalink
Added deployment folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dalmouiee committed Nov 30, 2023
1 parent 6a09bb9 commit fee92bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy/start_celery.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /usr/bin/env
# start-server.sh
echo "celery starting up"
cd /projects
poetry run celery -A dashboard worker -l info
21 changes: 21 additions & 0 deletions deploy/start_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /usr/bin/env
# start-server.sh

if [ "$DEPLOY_ENV" = "STAGING" ] || [ "$DEPLOY_ENV" = "PRODUCTION" ]
then
echo "Waiting for mysql..."
while ! nc -z db 3306; do
sleep 0.1
done
echo "MySQL started"
fi

echo "NGINX starting up dataweb server"
cd /projects
celery -A dataweb beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler &
python manage.py migrate --noinput
python manage.py collectstatic --noinput
python manage.py init_admin
gunicorn dataweb.wsgi --user www-data --bind 0.0.0.0:8010 --workers 3 --timeout 90 &
memcached -u root &
nginx -g "daemon off;"

0 comments on commit fee92bd

Please sign in to comment.