-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 1.1 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
-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/filesystem
-include ./.make/git
-include ./.make/mysql
## ----------------------------------------------------------
## Main
## ----------------------------------------------------------
.PHONY: install update start restart down
install:
make docker/start
$(SUDO) cp "$(PWD)/config/crontab/crontab" "/etc/cron.d/<MY_APP_NAME>.conf"
$(SUDO) cp "$(PWD)/config/nginx/proxy.conf" "/etc/nginx/sites-enabled/<MY_APP_NAME>.conf"
$(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 filesystem/dump
make mysql/dump