-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
69 lines (55 loc) · 1.71 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ----------------------------------------------------------
# Setup
# ----------------------------------------------------------
DOCKER_COMPOSE_FILE="./docker/docker-compose.yml"
DOCKER_COMPOSE=docker-compose -f $(DOCKER_COMPOSE_FILE)
# ----------------------------------------------------------
# Main Commands
# ----------------------------------------------------------
all: docker-build-all rebuild-mongo docker-up-all
docker-build-all:
pushd docker &&\
docker-compose build &&\
popd
docker-up-all:
pushd docker &&\
docker-compose up -d &&\
popd
up-db-local: rebuild-mongo
$(DOCKER_COMPOSE) up -d mongo
rebuild-mongo:
$(DOCKER_COMPOSE) build mongo-seed &&\
$(DOCKER_COMPOSE) up mongo-seed
# Alternate main commands if you have pushd/popd available, for reference
all-alt: up-db-local-alt
up-db-local-alt: rebuild-mongo-alt
pushd docker &&\
docker-compose up -d mongo &&\
popd
rebuild-mongo-alt:
pushd docker &&\
docker-compose build mongo-seed &&\
docker-compose up mongo-seed &&\
popd
# ----------------------------------------------------------
# Cleanup Helper Commands
# ----------------------------------------------------------
clean:
$(DOCKER_COMPOSE) down
docker volume rm docker_mongodata
# ----------------------------------------------------------
# Container Helper Commands
# ----------------------------------------------------------
# exec into mongo container
mongo-terminal:
docker exec -it docker_mongo_1 mongo
# tail the logs for the mongo instance
mongo-logs:
docker logs -f docker_mongo_1
# ----------------------------------------------------------
# Angular Commands
# ----------------------------------------------------------
ng-serve:
pushd src/main/ng/fxui &&\
ng serve &&\
popd