Skip to content

Commit

Permalink
Add commands and docs for loading dummy data (#1682)
Browse files Browse the repository at this point in the history
* add make target to load dummy data for docker

* load dummy data on postcreate devcontainer

* add docs for loading dummy data

* add missing docs dependencies
  • Loading branch information
sainak authored Oct 18, 2023
1 parent cb33897 commit c314b11
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"waitFor": "onCreateCommand",
"service": "backend",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "python manage.py migrate && python manage.py collectstatic --noinput",
"postCreateCommand": "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py load_dummy_data",
"postAttachCommand": {
"server": "python manage.py runserver"
},

"customizations": {
"vscode": {
"extensions": [
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ up:
down:
docker compose -f docker-compose.yaml -f $(docker_config_file) down

load-dummy-data:
docker compose exec backend bash -c "python manage.py load_dummy_data"

list:
docker compose -f docker-compose.yaml -f $(docker_config_file) ps

Expand Down
Loading

0 comments on commit c314b11

Please sign in to comment.