-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
49 lines (37 loc) · 983 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
REPO := ilmotta/ants-simulation
TAG := 1.0.0
CONTAINER_NAME := ants-simulation
DOCKER_JVM_OPTS := -XX:+UseContainerSupport -XX:MaxRAMPercentage=85 -XX:+UnlockExperimentalVMOptions
JVM_OPTS := -XX:MaxRAMPercentage=85 -XX:+UnlockExperimentalVMOptions
.PHONY: all test
all: run
check:
clojure -M --eval :ok
run:
clojure -M:run
run/release:
java $(JVM_OPTS) -jar target/app.jar
build:
clojure -X:uberjar
test:
clojure -M:test
clean:
rm -rf target/ .cpcache/
docker/build:
@docker build --tag $(REPO):$(TAG) --rm .
# Run to add IP to access control list.
# $ xhost +local:docker
docker/run/release:
@docker run -it --rm \
--name $(CONTAINER_NAME) \
--network=host \
-e DISPLAY=$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
$(REPO):$(TAG) java $(JVM_OPTS) -jar /usr/src/app/app.jar
docker/shell:
@docker run -it --rm \
--name $(CONTAINER_NAME) \
$(REPO):$(TAG) /bin/sh
docker/clean:
@docker rm -f $(CONTAINER_NAME); \
docker rmi -f $(REPO):$(TAG)