File tree 5 files changed +6
-9
lines changed
5 files changed +6
-9
lines changed Original file line number Diff line number Diff line change
1
+ release : python manage.py prepare_db && python manage.py db upgrade
1
2
web : sh ./scripts/heroku.sh
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ echo "[LOG] Using redis: ${REDIS_URL}"
5
5
if [ " $DEPLOYMENT " == " api" ]
6
6
then
7
7
echo " [LOG] Preparing database"
8
- python manage.py prepare_kubernetes_db
8
+ python manage.py prepare_db
9
9
echo " [LOG] Running migrations"
10
10
python manage.py db upgrade
11
11
echo " [LOG] Starting gunicorn on port 8080"
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def fix_event_and_speaker_images():
75
75
76
76
@manager .command
77
77
def fix_digit_identifier ():
78
- events = Event .query .filter (Event .identifier .op ('~' )('^[0-9\.]+$' )).all ()
78
+ events = Event .query .filter (Event .identifier .op ('~' )(r '^[0-9\.]+$' )).all ()
79
79
for event in events :
80
80
event .identifier = get_new_event_identifier ()
81
81
db .session .add (event )
@@ -147,7 +147,7 @@ def initialize_db(credentials):
147
147
148
148
149
149
@manager .command
150
- def prepare_kubernetes_db (
credentials = '[email protected] :fossasia' ):
150
+ def prepare_db (
credentials = '[email protected] :fossasia' ):
151
151
with app .app_context ():
152
152
initialize_db (credentials )
153
153
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ "$DEPLOYMENT" == "api" ]
9
9
then
10
10
echo " [LOG] Waiting for Database" && ./scripts/wait-for.sh ${POSTGRES_HOST} :5432 --timeout=60 -- echo " [LOG] Database Up"
11
11
echo " [LOG] Preparing database"
12
- python manage.py prepare_kubernetes_db
12
+ python manage.py prepare_db
13
13
echo " [LOG] Running migrations"
14
14
python manage.py db upgrade
15
15
export PORT=${PORT:- 8080}
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- python3 manage.py db upgrade
3
- python3 populate_db.py &
4
- export INTEGRATE_SOCKETIO=false
5
- # socketio has problems with celery "blocking" tasks
6
- # also socketio is not used in a celery task so no problem to turn it off
7
2
chmod -R 0777 ./static
8
3
./scripts/l10n.sh generate &
4
+ touch .env
9
5
celery -A app.instance.celery worker --loglevel=info -c 1 &
10
6
if [ " $APP_CONFIG " = " config.DevelopmentConfig" ]; then
11
7
python manage.py runserver -h 0.0.0.0 -p ${PORT:- 8000} --no-reload
You can’t perform that action at this time.
0 commit comments