diff --git a/Makefile b/Makefile index 1f117f8..5a4a4c5 100644 --- a/Makefile +++ b/Makefile @@ -13,18 +13,18 @@ ssh: ## Enter the running backend Docker container for the wagtail bakery site ssh-shell: ## Enter the running Docker container shell docker-compose exec web python manage.py shell -ssh-frontend: ## Enter the running Docker container shell +ssh-fe: ## Open a shell to work with the frontend code (Node/NPM) docker-compose exec frontend bash ssh-wagtail: ## Enter the running Docker container for the wagtail development environment docker-compose exec -w /code/wagtail web bash +ssh-db: ## Open a PostgreSQL shell session + docker-compose exec web python manage.py dbshell + clean: ## Stop and remove all Docker containers docker-compose down -run-tests: ## Stop and remove all Docker containers - docker-compose exec -w /code/wagtail web python runtests.py - migrations: ## Make migrations to the wagtail bakery site docker-compose exec web python manage.py makemigrations diff --git a/README.md b/README.md index f9c2feb..b6be336 100644 --- a/README.md +++ b/README.md @@ -86,37 +86,75 @@ frontend docker-entrypoint.sh /bin/ ... Up web ./manage.py runserver 0.0. ... Up 0.0.0.0:8000->8000/tcp ``` +### Build the backend Docker image +``` +make build +``` + +### Bring the backend Docker container up +``` +make up +``` + +### Stop the backend Docker container +``` +make down +``` + ### Run tests ```sh -docker-compose exec -w /code/wagtail web python runtests.py +make test +``` + +### Run tests for a specific file + +``` +make test file=wagtail.admin.tests.test_name.py ``` ### Open a Django shell session ```sh -docker-compose exec web python manage.py shell +make ssh-shell ``` ### Open a PostgreSQL shell session ```sh -docker-compose exec web python manage.py dbshell +make ssh-db ``` ### Open a shell on the web server ```sh -docker-compose exec web bash +make ssh ``` ### Open a shell to work with the frontend code (Node/NPM) ```sh -docker-compose exec frontend bash +make ssh-fe +``` + +### Open a shell to work with the frontend code (Node/NPM) + +```sh +make ssh-fe +``` + +### Make migrations to the wagtail bakery site + +``` +make migrations +``` + +### Migrate the wagtail bakery site + +``` +make migrate ``` -Getting ready to contribute --------------------------- Here are other actions you will likely need to do to make your first contribution to Wagtail.