This repository was archived by the owner on Feb 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.29 KB
/
Makefile
File metadata and controls
55 lines (43 loc) · 1.29 KB
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
################
# General Jobs #
################
default: configure deploy
configure: config-docker config-mongodb
###################
# Individual jobs #
###################
deploy:
@ sudo TAG=$(TAG) docker-compose $(YML) pull
@ sudo TAG=$(TAG) docker-compose $(YML) build
@ sudo TAG=$(TAG) docker-compose $(YML) up -d
config-docker:
@ wget -qO- https://raw.githubusercontent.com/PDCbc/devops/master/docker_setup.sh | sh
config-mongodb:
@ ( echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled )> /dev/null
@ ( echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag )> /dev/null
@ if(! grep --quiet 'never > /sys/kernel/mm/transparent_hugepage/enabled' /etc/rc.local ); \
then \
sudo sed -i '/exit 0/d' /etc/rc.local; \
( \
echo ''; \
echo '# Disable Transparent Hugepage, for Mongo'; \
echo '#'; \
echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'; \
echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag'; \
echo ''; \
echo 'exit 0'; \
) | sudo tee -a /etc/rc.local; \
fi; \
sudo chmod 755 /etc/rc.local
################
# Runtime prep #
################
# Default tag is latest
#
TAG ?= latest
# Default YML is base.yml
#
YML ?= -f ./docker-compose.yml
ifeq ($(MODE),dev)
YML += -f ./dev/dev.yml
endif