-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 996 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
42
43
44
45
46
47
include .env
user := $(shell id -u)
group := $(shell id -g)
ifeq ($(APP_ENV), prod)
dc := USER_ID=$(user) GROUP_ID=$(group) docker-compose -f docker-compose.prod.yaml
else ifeq ($(APP_ENV), dev)
dc := USER_ID=$(user) GROUP_ID=$(group) docker-compose -f docker-compose.dev.yaml
endif
dr := $(dc) run --rm
de := $(dc) exec
node := $(dr) node
php := $(dr) --no-deps php
sy := $(php) php bin/console
help:
@echo "################################"
@echo "# ENV :" $(APP_ENV)
@echo "################################"
@echo "docker-build"
docker-build:
$(dc) pull --ignore-pull-failures
$(dc) build node
$(dc) build php
server-start:
$(dc) up -d
# --------------------------------
# Dépendances
# --------------------------------
node_modules/time: yarn.lock
$(node) yarn
touch node_modules/time
public/assets: node_modules/time
$(node) yarn
$(node) yarn run build
vendor/autoload.php: composer.lock
$(php) composer update
touch vendor/autoload.php