-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
42 lines (35 loc) · 958 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
.SILENT :
.PHONY : config-keycloak build-webap deploy undeploy
# Compose files
define COMPOSE_FILES
-f docker-compose.yml \
-f docker-compose.config.yml \
-f docker-compose.app.yml
endef
# Include common Make tasks
include ./makefiles/help.Makefile
include ./makefiles/compose.Makefile
## Configure keycloak
config-keycloak:
docker-compose $(COMPOSE_FILES) run keycloak-config
## Build Web App
build-webapp:
echo "Building Web App..."
docker-compose $(COMPOSE_FILES) run build-webapp
## Deploy infrastructure to Docker host
deploy:
echo "Setup Nunux Keeper..."
cat .env
docker-compose up -d
$(MAKE) build-webapp
$(MAKE) config service=keycloak
docker-compose \
-f docker-compose.yml \
-f docker-compose.app.yml \
up -d
echo "Congrats! Nunux Keeper up and running."
## Teardown infrastructure from Docker host
undeploy:
echo "Teardown Nunux Keeper..."
docker-compose $(COMPOSE_FILES) down
echo "Nunux Keeper stopped and removed."