-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
35 lines (28 loc) · 1.11 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
IMAGE := mlafeldt/simianarmy
CHAOS_ASG_ENABLED := false
CHAOS_LEASHED := true
ENV := -e CONFD_OPTS="$(CONFD_OPTS)" \
-e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$(AWS_ACCESS_KEY_ID) \
-e SIMIANARMY_CLIENT_AWS_SECRETKEY=$(AWS_SECRET_ACCESS_KEY) \
-e SIMIANARMY_CLIENT_AWS_REGION=$(AWS_REGION) \
-e SIMIANARMY_CLIENT_LOCALDB_ENABLED=true \
-e SIMIANARMY_CALENDAR_ISMONKEYTIME=true \
-e SIMIANARMY_CHAOS_ASG_ENABLED=$(CHAOS_ASG_ENABLED) \
-e SIMIANARMY_CHAOS_LEASHED=$(CHAOS_LEASHED) \
-e SIMIANARMY_CHAOS_TERMINATEONDEMAND_ENABLED=true
build:
docker build --force-rm -t $(IMAGE) .
rebuild:
docker build --pull --no-cache --force-rm -t $(IMAGE) .
run: build
docker run -it --rm -p 8080:8080 $(ENV) $(IMAGE)
# For debugging.
shell: build
docker run -it --rm -p 8080:8080 $(ENV) $(IMAGE) /bin/bash
# Mount checkout of Simian Army for local development. Set SIMIANARMY_CHECKOUT
# to the directory where the Git repo is checked out. Inside the container, run
# /entrypoint.sh to start the server.
dev: build
docker run -it --rm -p 8080:8080 \
-v "$(SIMIANARMY_CHECKOUT)/src:/simianarmy/src" \
$(ENV) $(IMAGE) /bin/bash