##// END OF EJS Templates
fix(configs): removed waitress as a default runner for web service on development....
fix(configs): removed waitress as a default runner for web service on development. One of the big issues discovered receantly was due to waitress vs gunicorn differences on handling requests. Since gunicorn has a nice dev mode with code reloader we should use it as a default runner so we can avoid such issues in the past where dev setup runned different workers than production.

File last commit:

r1236:23af3321 default
r1236:23af3321 default
Show More
Makefile
138 lines | 3.5 KiB | text/x-makefile | MakefileLexer
makefiles: added gunicorn launch command
r1116 # required for pushd to work..
dev(makefile): added dev shell prompt
r1172 SHELL = /bin/bash
makefile: added standard makefile
r132
makefiles: added gunicorn launch command
r1116
makefile: added outdated packages helper
r832 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
makefile: added standard makefile
r132
makefile: cleanup makefile
r912 .PHONY: clean
makefile: updated to latest format
r1040 ## Cleanup compiled and cache py files
makefile: added standard makefile
r132 clean:
make test-clean
makefile: also cleanup .orig files
r642 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
makefile: always cleanup build dir
r1134 find . -type d -name "build" -prune -exec rm -rf '{}' ';'
makefile: added standard makefile
r132
makefile: cleanup makefile
r912
.PHONY: test
makefile: updates and cleanups
r1053 ## run test-clean and tests
makefile: added standard makefile
r132 test:
make test-clean
make test-only
makefile: cleanup makefile
r912
package: fix dev-env, bumped some deps to be consistent
r1102 .PHONY: test-clean
makefile: updates and cleanups
r1053 ## run test-clean and tests
test-clean:
rm -rf coverage.xml htmlcov junit.xml pylint.log result
find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
makefile: updated to latest format
r1040 .PHONY: test-only
## Run tests only without cleanup
test-only:
PYTHONHASHSEED=random \
py.test -x -vv -r xw -p no:sugar \
makefiles: added gunicorn launch command
r1116 --cov-report=term-missing --cov-report=html \
--cov=vcsserver vcsserver
makefile: updated to latest format
r1040
makefile: added helpers for code cleanups/builds
r1165 .PHONY: ruff-check
## run a ruff analysis
ruff-check:
ruff check --ignore F401 --ignore I001 --ignore E402 --ignore E501 --ignore F841 --exclude rhodecode/lib/dbmigrate --exclude .eggs --exclude .dev .
makefile: cleanup makefile
r912 .PHONY: pip-packages
makefile: updated to latest format
r1040 ## Show outdated packages
makefile: added outdated packages helper
r832 pip-packages:
python ${OUTDATED_PACKAGES}
makefile: cleanup makefile
r912
package: fix dev-env, bumped some deps to be consistent
r1102 .PHONY: build
## Build sdist/egg
build:
python -m build
makefile: updated to latest format
r1040
dev(makefile): added dev shell prompt
r1172 .PHONY: dev-sh
## make dev-sh
dev-sh:
dev(makefile): updated dev env to be synced with CE edition
r1174 sudo echo "deb [trusted=yes] https://apt.fury.io/rsteube/ /" | sudo tee -a "/etc/apt/sources.list.d/fury.list"
dev(makefile): added dev shell prompt
r1172 sudo apt-get update
dev(makefile): updated dev env to be synced with CE edition
r1174 sudo apt-get install -y zsh carapace-bin
dev(dev-shell): improvements to dev shell env
r1182 rm -rf /home/rhodecode/.oh-my-zsh
dev(makefile): added dev shell prompt
r1172 curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
chore(dev): print dev help cmd for nicer startup
r1207 @echo "source <(carapace _carapace)" > /home/rhodecode/.zsrc
@echo "${RC_DEV_CMD_HELP}"
dev(makefile): hide prompt info on dev sh env
r1213 @PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b %# ' zsh
dev(makefile): added dev shell prompt
r1172
chore(dev): small adjustment to makefile
r1198
makefile: updates and cleanups
r1053 .PHONY: dev-env
package: fix dev-env, bumped some deps to be consistent
r1102 ## make dev-env based on the requirements files and install develop of packages
makefile: added helpers for code cleanups/builds
r1165 ## Cleanup: pip freeze | grep -v "^-e" | grep -v "@" | xargs pip uninstall -y
makefile: updates and cleanups
r1053 dev-env:
Andrii Verbytskyi
fixed permissions for pip cache folder
r1227 sudo -u root chown rhodecode:rhodecode /home/rhodecode/.cache/pip/
tests: test fixes after py311 compat run
r1115 pip install build virtualenv
deps: make dev-env build faster and cache rc_testdata
r1090 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
makefile: updates and cleanups
r1053 pip install -e .
makefile: updated to latest format
r1040
makefile: added dev-srv command to run the server app
r1104
dev(makefile): added sh shortcut for faster launch of dev env and shell
r1180 .PHONY: sh
## shortcut for make dev-sh dev-env
sh:
chore(dev): small adjustment to makefile
r1198 make dev-env
make dev-sh
dev(makefile): added sh shortcut for faster launch of dev env and shell
r1180
makefile: added workers=n to gunicorn startup command
r1232 ## Allows changes of workers e.g make dev-srv-g workers=2
workers?=1
makefile: added dev-srv command to run the server app
r1104
fix(configs): removed waitress as a default runner for web service on development....
r1236 .PHONY: dev-srv
makefiles: added gunicorn launch command
r1116 ## run gunicorn multi process workers
dev-srv-g:
makefile: added workers=n to gunicorn startup command
r1232 gunicorn --paste=.dev/dev.ini --bind=0.0.0.0:10010 --config=.dev/gunicorn_config.py --reload --workers=$(workers)
makefiles: added gunicorn launch command
r1116
makefile: added helpers for code cleanups/builds
r1165
makefile: updated to latest format
r1040 # Default command on calling make
.DEFAULT_GOAL := show-help
.PHONY: show-help
show-help:
@echo "$$(tput bold)Available rules:$$(tput sgr0)"
@echo
@sed -n -e "/^## / { \
h; \
s/.*//; \
:doc" \
-e "H; \
n; \
s/^## //; \
t doc" \
-e "s/:.*//; \
G; \
s/\\n## /---/; \
s/\\n/ /g; \
p; \
}" ${MAKEFILE_LIST} \
| LC_ALL='C' sort --ignore-case \
| awk -F '---' \
-v ncol=$$(tput cols) \
-v indent=19 \
-v col_on="$$(tput setaf 6)" \
-v col_off="$$(tput sgr0)" \
'{ \
printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
n = split($$2, words, " "); \
line_length = ncol - indent; \
for (i = 1; i <= n; i++) { \
line_length -= length(words[i]) + 1; \
if (line_length <= 0) { \
line_length = ncol - indent - length(words[i]) - 1; \
printf "\n%*s ", -indent, " "; \
} \
printf "%s ", words[i]; \
} \
printf "\n"; \
makefile: updates and cleanups
r1053 }'