forked from osu-NoLimits/bancho.py-ex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (44 loc) · 1.27 KB
/
Makefile
File metadata and controls
62 lines (44 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env make
build:
if [ -d ".dbdata" ]; then sudo chmod -R 755 .dbdata; fi
docker build -t bancho:latest .
run:
docker compose up bancho mysql redis
go:
docker attach banchopy-ex_bancho_1
stop:
docker stop banchopy-ex_bancho_1
run-s:
docker-compose up -d bancho
run-bg:
docker compose up -d bancho mysql redis
run-cfd:
docker compose -f docker-compose.cloudflared.yml up
run-cfd-bg:
docker compose -f docker-compose.cloudflared.yml up -d
run-caddy:
caddy run --envfile .env --config ext/Caddyfile
last?=1
logs:
docker compose logs -f bancho mysql redis --tail ${last}
shell:
poetry shell
test:
docker compose -f docker-compose.test.yml up -d bancho-test mysql-test redis-test
docker compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh
lint:
poetry run pre-commit run --all-files
type-check:
poetry run mypy .
install:
POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root
install-dev:
POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root --with dev
poetry run pre-commit install
uninstall:
poetry env remove python
# To bump the version number run `make bump version=<major/minor/patch>`
# (DO NOT USE IF YOU DON'T KNOW WHAT YOU'RE DOING)
# https://python-poetry.org/docs/cli/#version
bump:
poetry version $(version)