This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (38 loc) · 1.43 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
SHELL := /bin/bash # Use bash syntax
.PHONY: run in mysql stop clean build install run-homolog run-dev ci-deploy-dev ci-deploy-homolog ci-deploy-prod ci-deploy-tests-dev
# Configure environment.
# ----------------------
export TZ=America/Sao_Paulo
export USER_ID=$(shell id -u)
# @TODO Hack for MacOSX or other OS which has the same group id
# than the containers user.
export GROUP_ID=$(shell if [ `id -g` == '20' ]; then echo '1000'; else echo `id -g`; fi)
run:
docker-compose run --service-ports --rm drupal
run-dev:
docker-compose -f docker-compose.dev.yml up -d
in:
docker exec -it $(shell docker-compose ps | grep _app_run_ | cut -d" " -f 1) /bin/bash
test:
docker-compose run --service-ports --rm drupal scripts/test.sh
mysql:
docker exec -it natura-poc-db mysql -h localhost -u root -ppassword drupal
stop:
docker-compose stop
clean:
docker-compose down
build:
docker-compose build drupal
install:
docker-compose run --entrypoint="./docker/run-entrypoint.sh" --rm drupal composer install
install-prod:
docker-compose run --entrypoint="./docker/run-entrypoint.sh" --rm drupal composer install --no-dev --prefer-dist --optimize-autoloader
styles:
./scripts/styles.sh
run-homolog:
sudo docker-compose -f docker-compose.homolog.yml up -d
ci-deploy: install-prod
./scripts/ci-deploy.sh
ci-deploy-continue:
docker-compose -f docker-compose.prod.yml build --no-cache; docker-compose -f docker-compose.prod.yml up -d
default: run