mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-06 05:00:18 +03:00
Add --rm to all docker run commands in CI
This commit is contained in:
parent
6a526ac633
commit
6257cb6ea3
|
@ -18,19 +18,19 @@ cd my_awesome_project
|
||||||
docker compose -f docker-compose.local.yml build
|
docker compose -f docker-compose.local.yml build
|
||||||
|
|
||||||
# run the project's type checks
|
# run the project's type checks
|
||||||
docker compose -f docker-compose.local.yml run django mypy my_awesome_project
|
docker compose -f docker-compose.local.yml run --rm django mypy my_awesome_project
|
||||||
|
|
||||||
# run the project's tests
|
# run the project's tests
|
||||||
docker compose -f docker-compose.local.yml run django pytest
|
docker compose -f docker-compose.local.yml run --rm django pytest
|
||||||
|
|
||||||
# return non-zero status code if there are migrations that have not been created
|
# return non-zero status code if there are migrations that have not been created
|
||||||
docker compose -f docker-compose.local.yml run django python manage.py makemigrations --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
|
docker compose -f docker-compose.local.yml run --rm django python manage.py makemigrations --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
|
||||||
|
|
||||||
# Test support for translations
|
# Test support for translations
|
||||||
docker compose -f docker-compose.local.yml run django python manage.py makemessages --all
|
docker compose -f docker-compose.local.yml run --rm django python manage.py makemessages --all
|
||||||
|
|
||||||
# Make sure the check doesn't raise any warnings
|
# Make sure the check doesn't raise any warnings
|
||||||
docker compose -f docker-compose.local.yml run \
|
docker compose -f docker-compose.local.yml run --rm \
|
||||||
-e DJANGO_SECRET_KEY="$(openssl rand -base64 64)" \
|
-e DJANGO_SECRET_KEY="$(openssl rand -base64 64)" \
|
||||||
-e REDIS_URL=redis://redis:6379/0 \
|
-e REDIS_URL=redis://redis:6379/0 \
|
||||||
-e DJANGO_AWS_ACCESS_KEY_ID=x \
|
-e DJANGO_AWS_ACCESS_KEY_ID=x \
|
||||||
|
@ -42,10 +42,10 @@ docker compose -f docker-compose.local.yml run \
|
||||||
django python manage.py check --settings=config.settings.production --deploy --database default --fail-level WARNING
|
django python manage.py check --settings=config.settings.production --deploy --database default --fail-level WARNING
|
||||||
|
|
||||||
# Generate the HTML for the documentation
|
# Generate the HTML for the documentation
|
||||||
docker compose -f docker-compose.docs.yml run docs make html
|
docker compose -f docker-compose.docs.yml run --rm docs make html
|
||||||
|
|
||||||
# Run npm build script if package.json is present
|
# Run npm build script if package.json is present
|
||||||
if [ -f "package.json" ]
|
if [ -f "package.json" ]
|
||||||
then
|
then
|
||||||
docker compose -f docker-compose.local.yml run node npm run build
|
docker compose -f docker-compose.local.yml run --rm node npm run build
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user