Update README and Add Makefile
This commit is contained in:
parent
17e952bdbd
commit
afd6711f64
33
Makefile
Normal file
33
Makefile
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
.DEFAULT_GOAL := help
|
||||||
|
help:
|
||||||
|
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
clean: clean-build clean-pyc
|
||||||
|
|
||||||
|
clean-build: ## remove build artifacts
|
||||||
|
rm -fr build/
|
||||||
|
rm -fr dist/
|
||||||
|
rm -fr *.egg-info
|
||||||
|
|
||||||
|
clean-pyc: ## remove Python file artifacts
|
||||||
|
find . -name '*.pyc' -exec rm -f {} +
|
||||||
|
find . -name '*.pyo' -exec rm -f {} +
|
||||||
|
find . -name '*~' -exec rm -f {} +
|
||||||
|
|
||||||
|
lint: ## check style with flake8
|
||||||
|
flake8 .
|
||||||
|
black --check .
|
||||||
|
node_modules/.bin/prettier --check .
|
||||||
|
|
||||||
|
test: ## run tests quickly with the default Python
|
||||||
|
pytest
|
||||||
|
|
||||||
|
sdist: clean ## package
|
||||||
|
python setup.py sdist
|
||||||
|
ls -l dist
|
||||||
|
|
||||||
|
run.migrations:
|
||||||
|
docker-compose -f docker-compose.dev.yaml run --rm -T --no-deps web sh -c "python manage.py migrate"
|
||||||
|
|
||||||
|
run.server:
|
||||||
|
docker-compose -f docker-compose.dev.yaml up
|
@ -20,7 +20,6 @@ gulp dev
|
|||||||
|
|
||||||
## Change path templates
|
## Change path templates
|
||||||
|
|
||||||
|
|
||||||
In `settings.py`.
|
In `settings.py`.
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
@ -50,7 +49,7 @@ Update `DIRS`.
|
|||||||
# Run development
|
# Run development
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
docker-compose -f docker-compose.dev.yaml up
|
make run.server
|
||||||
```
|
```
|
||||||
|
|
||||||
Now open:
|
Now open:
|
||||||
@ -74,7 +73,7 @@ docker exec -it api_django_1 bash
|
|||||||
# Run production
|
# Run production
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
docker-compose up -d
|
docker-compose -f docker-compose.pro.yaml up
|
||||||
```
|
```
|
||||||
|
|
||||||
Open `https://domain.com`.
|
Open `https://domain.com`.
|
||||||
|
Loading…
Reference in New Issue
Block a user