-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (26 loc) · 1.13 KB
/
Makefile
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
# Shortcut makefile list
help: ## Show this help.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
test: build ## Currently broken, requires build
docker compose run admin_bot test
configure-pipenv: ## sets up pipenv for you
pipenv install -r admin_bot/requirements/requirements.txt
pipenv install -r admin_interface/requirements/requirements.txt
pipenv shell
build: ## Build containers locally
# Generate tag
echo TAG=$(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g') > .env
# Build
docker compose build --build-arg GIT_COMMIT=$(shell git describe --abbrev=8 --always --tags --dirty) --build-arg DEBUG=True
docker-rm: stop ## Delete containers, requires stop
docker compose rm -f
shell: ## Get container shell
docker compose run --entrypoint "/bin/bash" admin_bot
run: build ## Run command in container, requires build
docker compose up
stop: ## Stop containers
docker compose down
docker compose stop
# Specific stuff
flask-local: ## Runs flask locally for you!
cd admin_interface/admin_interface && flask --app main.py run