-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
executable file
·51 lines (40 loc) · 1001 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
47
48
49
50
51
-include .creds
DOCKER_PW := ${DOCKER_PW}
BASEIMAGE := xycarto/wesm-data-viewer
IMAGE := $(BASEIMAGE):2024-01-09
RUN ?= docker run -it --rm \
-u $$(id -u):$$(id -g) \
-e DISPLAY=$$DISPLAY \
--env-file .creds \
-e RUN= \
-v$$(pwd):/work \
--net=host \
-w /work $(IMAGE)
##### WESM Indexing #####
ol-app:
npm create ol-app site-dev
# make build-move indir=site-dev outdir=docs
#
build-move:
python3 src/build-move.py $(indir) $(outdir)
##### DOCKER #####
local-edit: Dockerfile
docker run -it --rm --net=host \
--user=$$(id -u):$$(id -g) \
-e DISPLAY=$$DISPLAY \
--env-file .creds \
-e RUN= \
-v$$(pwd):/work \
-w /work \
$(IMAGE)
bash
docker-local: Dockerfile
docker build --tag $(BASEIMAGE) - < $< && \
docker tag $(BASEIMAGE) $(IMAGE)
docker: Dockerfile
echo $(DOCKER_PW) | docker login --username xycarto --password-stdin
docker build --tag $(BASEIMAGE) - < $< && \
docker tag $(BASEIMAGE) $(IMAGE) && \
docker push $(IMAGE)
docker-pull:
docker pull $(IMAGE)