-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 1.12 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
.SUFFIXES:
SITE_PACKAGES := $(shell pip show pip | grep '^Location' | cut -d' ' -f2-)
# read and include .devcontainer/.env exporting all variables
ifneq (,$(wildcard .devcontainer/.env))
include .devcontainer/.env
export
endif
ifneq (,$(wildcard .env))
include .env
export
endif
.PHONY: run reqs ansible
run: $(SITE_PACKAGES)
@clear
-@killall python3 3>&1 1>/dev/null 2>&3 || true
python3 app/app.py
reqs: $(SITE_PACKAGES)
$(SITE_PACKAGES): requirements.txt
pip install -r requirements.txt
-sudo touch $(SITE_PACKAGES)
ansible:
sudo chown -R ${USER}:${USER} ~/
-LC_ALL=C.UTF-8 ansible-playbook --inventory 127.0.0.1 --connection=local .devcontainer/ansible/setup-container.yml
build-image:
docker build --target production -t ghcr.io/traefikturkey/onboard:latest .
push-image: build-image
docker push ghcr.io/traefikturkey/onboard
run-image: build-image
docker run -it --rm -p 9830:9830 -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/traefikturkey/onboard:latest
bash-image: build-image
docker run -it --rm -p 9830:9830 -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/traefikturkey/onboard:latest bash