This repository was archived by the owner on May 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.33 KB
/
Makefile
File metadata and controls
48 lines (37 loc) · 1.33 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
SHELL = /bin/bash
MAGERUN = docker-compose run --rm web n98-magerun
COMPOSER = docker-compose run --rm web composer -d="../"
dev_setup: mage_symlinks modman_deploy
install:
@if [ ! -d "htdocs/app/etc/" ]; then mkdir -p htdocs/app/etc/; fi
@docker-compose up -d
@sleep 5
@make composer_install
@npm install
@make mage_local_xml
@make mage_base_url
@make open_web
composer_install:
@${COMPOSER} install --prefer-dist -n
@make modman_deploy
modman_deploy:
@${COMPOSER} modman
open_web:
@make open container=web port=80
open:
@URL="http://127.0.0.1"$$(docker-compose port $(container) $(port) 2>/dev/null | sed s/0.0.0.0//); \
$$(if [ $$(uname) != 'Darwin' ]; then echo 'xdg-'; fi)open $$URL
mage_symlinks:
@docker-compose run --rm web n98-magerun dev:symlinks --on --global
mage_local_xml:
@if test -f htdocs/app/etc/local.xml; then rm htdocs/app/etc/local.xml; fi
@docker-compose run --rm web /bin/bash -c 'n98-magerun local-config:generate $${DB_1_PORT_3306_TCP_ADDR} root $${DB_1_ENV_MYSQL_ROOT_PASSWORD} magento files admin';
mage_base_url:
@docker-compose run --rm web set-base-url $$(docker-compose port web 80 2>/dev/null | sed s/0.0.0.0://) $$(docker-compose port web 443 2>/dev/null | sed s/0.0.0.0://);
docker_run:
@docker-compose up -d
@sleep 5
@make mage_local_xml
@make mage_base_url
@make open_web
@npm run watch