-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 733 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (26 loc) · 733 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
# docker listener service makefile
APP_SERVICE_NAME = "auth0apache"
APP_SERVICE_OWNER = "taherbs"
CONTAINER_NAME = "$(APP_SERVICE_OWNER)/$(APP_SERVICE_NAME)"
PLATFORM="centos" #Alternative value "ubuntu"
# get the workdir depending on the OS
ifeq ($(OS),Windows_NT)
WORK_DIR = $(CURDIR)
else
WORK_DIR = $(PWD)
endif
.PHONY: build
build:
docker build -f Dockerfile-$(PLATFORM) -t $(CONTAINER_NAME):latest .
.PHONY: start
start: stop build
docker run --detach --publish 80:80 --publish 443:443 --name $(APP_SERVICE_NAME) --tty $(CONTAINER_NAME):latest
.PHONY: stop
stop:
docker rm -f $(APP_SERVICE_NAME) || true
.PHONY: ssh
ssh:
docker exec -it $(APP_SERVICE_NAME) bash
.PHONY: logs
logs:
docker logs $(APP_SERVICE_NAME)