kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Merge branch 'main' of github.com:wagtail/docker-wagtail-develop
commit
a3e149af2d
|
@ -0,0 +1,44 @@
|
|||
.PHONY: help
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
help: ## ⁉️ - Display help comments for each make command
|
||||
@grep -E '^[0-9a-zA-Z_-]+:.*? .*$$' \
|
||||
$(MAKEFILE_LIST) \
|
||||
| awk 'BEGIN { FS=":.*?## " }; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' \
|
||||
| sort
|
||||
|
||||
build: ## Build the backend Docker image
|
||||
docker-compose build web
|
||||
|
||||
start: ## Bring the backend Docker container up
|
||||
docker-compose up
|
||||
|
||||
stop: ## Stop the backend Docker container
|
||||
docker-compose stop
|
||||
|
||||
ssh: ## Enter the running backend Docker container for the wagtail bakery site
|
||||
docker-compose exec web bash
|
||||
|
||||
ssh-shell: ## Enter the running Docker container shell
|
||||
docker-compose exec web python manage.py 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
|
||||
|
||||
down: ## Stop and remove all Docker containers
|
||||
docker-compose down
|
||||
|
||||
migrations: ## Make migrations to the wagtail bakery site
|
||||
docker-compose exec web python manage.py makemigrations
|
||||
|
||||
migrate: ## Migrate the wagtail bakery site migrations
|
||||
docker-compose exec web python manage.py migrate
|
||||
|
||||
test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name.py`
|
||||
docker-compose exec -w /code/wagtail web python runtests.py $(FILE)
|
99
README.md
99
README.md
|
@ -86,36 +86,133 @@ 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
|
||||
```sh
|
||||
make build
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose build web
|
||||
```
|
||||
|
||||
### Bring the backend Docker container up
|
||||
|
||||
```sh
|
||||
make start
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### Stop all Docker containers
|
||||
|
||||
```sh
|
||||
make stop
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose stop
|
||||
```
|
||||
### Stop all and remove all Docker containers
|
||||
|
||||
```sh
|
||||
make down
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
### Run tests
|
||||
|
||||
```sh
|
||||
make test
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec -w /code/wagtail web python runtests.py
|
||||
```
|
||||
|
||||
### Run tests for a specific file
|
||||
|
||||
```sh
|
||||
make test file=wagtail.admin.tests.test_name.py
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec -w /code/wagtail web python runtests.py wagtail.admin.tests.{test_file_name_here}.py
|
||||
```
|
||||
|
||||
### Open a Django shell session
|
||||
|
||||
```sh
|
||||
make ssh-shell
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec web python manage.py shell
|
||||
```
|
||||
|
||||
### Open a PostgreSQL shell session
|
||||
|
||||
```sh
|
||||
make ssh-db
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec web python manage.py dbshell
|
||||
```
|
||||
|
||||
### Open a shell on the web server
|
||||
|
||||
```sh
|
||||
make ssh
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec web bash
|
||||
```
|
||||
|
||||
### Open a shell to work with the frontend code (Node/NPM)
|
||||
|
||||
```sh
|
||||
make ssh-fe
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec frontend bash
|
||||
```
|
||||
|
||||
### Open a shell to work within the wagtail container
|
||||
|
||||
```sh
|
||||
make ssh-fe
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec -w /code/wagtail web bash
|
||||
```
|
||||
|
||||
### Make migrations to the wagtail bakery site
|
||||
|
||||
```sh
|
||||
make migrations
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec web python manage.py makemigrations
|
||||
```
|
||||
|
||||
### Migrate the wagtail bakery site
|
||||
|
||||
```sh
|
||||
make migrate
|
||||
```
|
||||
or
|
||||
```sh
|
||||
docker-compose exec web python manage.py migrate
|
||||
```
|
||||
|
||||
Getting ready to contribute
|
||||
---------------------------
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue