forked from dnknth/ldap-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (34 loc) · 984 Bytes
/
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
43
44
45
46
.PHONY: debug run clean tidy image push manifest
TAG = latest-$(subst aarch64,arm64,$(shell uname -m))
debug: app.py settings.py .env .venv3 dist
QUART_APP=$< QUART_ENV=development \
.venv3/bin/python3 .venv3/bin/quart run
run: app.py settings.py .env .venv3 dist
.venv3/bin/hypercorn -b 0.0.0.0:5000 --access-logfile - app:app
.env: env.example
cp $< $@
.venv3: requirements.txt
[ -d $@ ] || python3 -m venv --system-site-packages $@
.venv3/bin/pip3 install -U pip wheel
.venv3/bin/pip3 install -r $<
touch $@
dist: node_modules
npm run build
node_modules: package.json
npm install
npm audit
touch $@
clean:
rm -rf dist __pycache__
tidy: clean
rm -rf .venv3 node_modules
image: clean
docker build -t dnknth/ldap-ui:$(TAG) .
push: image
docker push dnknth/ldap-ui:$(TAG)
manifest: push
docker manifest create \
dnknth/ldap-ui \
--amend dnknth/ldap-ui:latest-x86_64 \
--amend dnknth/ldap-ui:latest-arm64
docker manifest push --purge dnknth/ldap-ui