-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (28 loc) · 884 Bytes
/
Makefile
File metadata and controls
34 lines (28 loc) · 884 Bytes
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
# Load env vars from .env file
ifneq (,$(wildcard ./.env))
include .env
export
endif
img = hub.opensciencegrid.org/macrostrat/web-legacy
version = 1.0.3
tag = $(img):$(version)
# set the default value for the port
HTTP_PORT ?= 5200
# Test with v2 domain
all:
docker build -t $(tag) .
echo "Running on https://localhost:$(HTTP_PORT)"
docker run -it --rm \
-e MACROSTRAT_DOMAIN \
-e MACROSTRAT_TILESERVER_DOMAIN \
-e MAPBOX_ACCESS_TOKEN \
-p $(HTTP_PORT):80 $(tag)
publish:
# Check that we are fully committed to git before publishing
if [ -n "$$(git status --porcelain)" ]; then \
echo "Error: Uncommitted changes detected. Please commit or stash your changes before publishing."; \
exit 1; \
fi
docker build -t $(tag) .
docker buildx build --platform linux/amd64,linux/arm64 -t $(tag) --push .
git tag -a v$(version) -m "Release version $(version)"