Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Commit 515f3bc

Browse files
author
Florian Horn
committed
Updated dev setup
1 parent 8115877 commit 515f3bc

File tree

19 files changed

+156
-64
lines changed

19 files changed

+156
-64
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88
/.docker
99
/build
1010
/tags
11-
/var
12-
/generated
11+
/src
1312
composer.phar

bin/bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./bin/cli bash

bin/cli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
3+
docker-compose exec phpfpm "$@"

bin/composer

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./bin/cli composer "$@"

bin/dev-urn-catalog-generate

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
./bin/magento dev:urn-catalog:generate misc.xml
3+
4+
sed -i .bak 's?/var/www/html?'`pwd`/src'?' src/misc.xml
5+
rm src/misc.xml.bak
6+
mkdir -p .idea
7+
mv src/misc.xml .idea/misc.xml
8+
9+
echo "URN's have been generated, you may now restart PHPStorm"

bin/download

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
[ -z "$1" ] && echo "Please specify the version to download (ex. 2.0.0)" && exit
3+
mkdir -p src && curl -L http://pubfiles.nexcess.net/magento/ce-packages/magento2-$1.tar.gz | tar xzf - -o -C src

bin/fixperms

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
echo "Correcting filesystem permissions..."
3+
4+
./bin/cli find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
5+
./bin/cli find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
6+
./bin/cli chmod u+x bin/magento
7+
8+
echo "Filesystem permissions corrected."

bin/initloopback

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
################################################################################
4+
macOS
5+
################################################################################
6+
sudo ifconfig lo0 alias 10.254.254.254 255.255.255.0
7+
sudo bash -c "curl https://raw.githubusercontent.com/markoshust/magento-docker/master/lib/com.network.alias.plist > /Library/LaunchDaemons/com.network.alias.plist"
8+
sudo chmod 0644 /Library/LaunchDaemons/com.network.alias.plist
9+
sudo chown root:wheel /Library/LaunchDaemons/com.network.alias.plist
10+
sudo launchctl load /Library/LaunchDaemons/com.network.alias.plist
11+
12+
################################################################################
13+
Fedora
14+
################################################################################
15+
# To enable immediately:
16+
#sudo ip addr add 10.254.254.254 dev lo label lo:0
17+
#
18+
# To persist after reboots:
19+
# edit file at /etc/sysconfig/network-scripts/ifcfg-lo:0 with the following configuration values:
20+
#
21+
#ISALIAS=yes
22+
#DEVICE=lo:0
23+
#ONBOOT=yes
24+
#BOOTPROTO=none
25+
#IPADDR=10.254.254.254
26+
#NETMASK=255.255.255.0
27+
#TYPE=Ethernet
28+
#
29+
# Aftewards, create the following symlinks:
30+
#ln /etc/sysconfig/network-scripts/ifcfg-lo:0 /etc/sysconfig/networking/devices/ifcfg-lo:0
31+
#ln /etc/sysconfig/network-scripts/ifcfg-lo:0 /etc/sysconfig/networking/profiles/default/ifcfg-lo:0

bin/magento

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./bin/cli ./bin/magento "$@"

bin/root

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
3+
docker-compose exec -u root phpfpm "$@"

0 commit comments

Comments
 (0)