-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (44 loc) · 1.28 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
-include .env
-include .env.local
-include .env.$(APP_ENV)
-include .env.$(APP_ENV).local
export
COMPOSE_PROJECT_NAME := $(APP_NAME)_$(APP_INSTANCE)
CONTAINER_APP := app
CONTAINER_DATABASE := database
DOCKER_APP := $(APP_NAME)_$(CONTAINER_APP)_$(APP_INSTANCE)
DOCKER_DATABASE := $(APP_NAME)_$(CONTAINER_DATABASE)_$(APP_INSTANCE)
SUDO := $(shell sh -c "if [ 0 != $EUID ]; then echo 'sudo'; fi")
KERNEL := $(shell sh -c "uname")
-include ./.make/docker
-include ./.make/git
-include ./.make/mysql
## ----------------------------------------------------------
## Database
## ----------------------------------------------------------
.PHONY: database/dump database/restore
database/dump:
make mysql/dump
database/restore:
make mysql/restore
## ----------------------------------------------------------
## Main
## ----------------------------------------------------------
.PHONY: install update start restart down dump
install:
make docker/start
$(SUDO) cp "$(PWD)/config/nginx/proxy.conf" "/etc/nginx/sites-enabled/nuxeo.conf"
$(SUDO) cp "$(PWD)/config/crontab/nuxeo" "/etc/cron.d/nuxeo"
$(SUDO) service nginx restart
update:
make docker/down
make git/update
make docker/start
start:
make docker/start
restart:
make docker/restart
down:
make docker/down
dump:
make database/dump