-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (33 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Shortcuts for development when using docker compose.
# Part documentation, part convenience
#
# Whenever possible we recommend using an interactive shell inside of web
# container instead, since that gives full/easier access to any available
# Django or Wagtail commands
#
# This can be accessed by running: `docker compose exec web bash`
shell:
docker compose exec web bash
makemigrations:
docker compose exec web python manage.py makemigrations
migrate:
docker compose exec web python manage.py migrate
createsuperuser:
docker compose exec web python manage.py createsuperuser
mode = refresh
seed-for-development:
docker compose exec web python manage.py seed --mode=$(mode)
# Run to trigger publishing of scheduled content when developing locally
# in production we run a cronjob that runs the wagtail command every x minutes
publish-scheduled:
docker compose exec web python manage.py publish_scheduled
# Run to create a new app (aka. section) in the project
# Example: `make startapp name=blog`
startapp:
docker compose exec web python manage.py startapp $(name)
test:
docker compose exec web python manage.py test
# Run tests with sqllite instead of postgres, mainly for CI purposes
ci-test:
DATABASE_ENGINE=django.db.backends.sqlite3 python manage.py collectstatic
DATABASE_ENGINE=django.db.backends.sqlite3 python manage.py test