Skip to content

Commit d464308

Browse files
authored
Merge pull request #697 from dodo920306/fix/make-migrations-outside-of-images
Remove migrations from image entrypoints and fix default random model field values generation
2 parents 8860a28 + 071add7 commit d464308

File tree

5 files changed

+339
-6
lines changed

5 files changed

+339
-6
lines changed

build_image/docker/common/api-engine/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ envsubst < ${RAW_LOCAL_SETTINGS} > ${LOCAL_SETTINGS}
1010

1111
holdup -t 120 tcp://${DB_HOST}:${DB_PORT};
1212
if [[ "$RUN_MODE" == "server" ]]; then
13-
python manage.py makemigrations && python manage.py migrate;
13+
python manage.py migrate;
1414
python manage.py create_user \
1515
--username ${API_ENGINE_ADMIN_USERNAME:-admin} \
1616
--password ${API_ENGINE_ADMIN_PASSWORD:-pass} \

build_image/dockerhub/latest/common/api-engine/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ envsubst < ${RAW_LOCAL_SETTINGS} > ${LOCAL_SETTINGS}
1010

1111
holdup -t 120 tcp://${DB_HOST}:${DB_PORT};
1212
if [[ "$RUN_MODE" == "server" ]]; then
13-
python manage.py makemigrations && python manage.py migrate;
13+
python manage.py migrate;
1414
python manage.py create_user \
1515
--username ${API_ENGINE_ADMIN_USERNAME:-admin} \
1616
--password ${API_ENGINE_ADMIN_PASSWORD:-pass} \

0 commit comments

Comments
 (0)