-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #520 from iMMAP/chore/reduce_docker_django_image_size
reduced the django docker image size
- Loading branch information
Showing
4 changed files
with
30 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,13 @@ set -e | |
echo "Preparing Django Application" | ||
|
||
# static files | ||
make collectstatic settings=core.settings.production | ||
echo "DEBUG: $DEBUG" | ||
make npm-build | ||
# rm -rf src/static/node_modules | ||
poetry run python src/manage.py collectstatic --settings=core.settings.production --no-input --ignore=node_modules --ignore=*.scss --ignore=*.json --ignore=vite.config.js | ||
|
||
# Create super user | ||
# Password is set in the env file. variable DJANGO_SUPERUSER_PASSWORD | ||
poetry run python src/manage.py createsuperuser --username=admin [email protected] --no-input --setting=core.settings.production || true | ||
|
||
# database | ||
make migrate | ||
poetry run python src/manage.py migrate | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters