Last active
January 14, 2019 12:04
-
-
Save lcdss/f79f8cd996eb8f7d1e77ac7e63c60310 to your computer and use it in GitHub Desktop.
Revisions
-
lcdss revised this gist
Nov 11, 2018 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,6 +44,10 @@ docker-php-ext-install opcache sysctl net.ipv4.conf.all.forwarding=1 iptables -P FORWARD ACCEPT # Problems to solve folders permissions - maybe using the same user/group when running the container auto install some extensions inside php container - exists a faster solution than creating a custom Dockerfile? # Alias / Functions composer () { tty= -
lcdss revised this gist
Nov 11, 2018 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,14 @@ - docker - www - app1 - app2 - config - nginx - logs - nginx - data - mariadb docker run -itd \ --restart unless-stopped \ --name nginx \ -
lcdss revised this gist
Nov 11, 2018 . 1 changed file with 51 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,10 +25,55 @@ docker run -itd \ -e MYSQL_DATABASE=dbname \ mariadb # PHP Extensions docker-php-ext-install pdo_mysql docker-php-ext-install opcache # Not confirmed if it is necessary sysctl net.ipv4.conf.all.forwarding=1 iptables -P FORWARD ACCEPT # Alias / Functions composer () { tty= tty -s && tty=--tty docker run \ $tty \ --interactive \ --rm \ --user $(id -u):$(id -g) \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ --volume $(pwd):/app \ composer "$@" } npm () { tty= tty -s && tty=--tty docker run \ $tty \ --interactive \ --rm \ -w /usr/src/app \ --user $(id -u):$(id -g) \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ --volume $(pwd):/usr/src/app \ node:alpine npm --no-cache "$@" } php () { tty= tty -s && tty=--tty docker run \ $tty \ --interactive \ --rm \ -w /usr/src/app \ --user $(id -u):$(id -g) \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ --volume $(pwd):/usr/src/app \ php:alpine "$@" } -
lcdss revised this gist
Nov 11, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,8 @@ docker run -itd \ PHP Extensions docker-php-ext-install pdo_mysql docker-php-ext-install opcache Not confirmed if it is necessary sysctl net.ipv4.conf.all.forwarding=1 iptables -P FORWARD ACCEPT -
lcdss revised this gist
Nov 11, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,8 @@ docker run -itd \ --network backend \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=dbname \ mariadb PHP Extensions docker-php-ext-install pdo_mysql docker-php-ext-install opcache -
lcdss created this gist
Nov 11, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ docker run -itd \ --restart unless-stopped \ --name nginx \ --network backend \ -p 80:80 \ -p 443:443 \ -v ~/docker/www:/var/www \ -v ~/docker/config/nginx:/etc/nginx/conf.d \ -w /var/www \ nginx:alpine docker run -itd \ --restart unless-stopped \ --name php \ --network backend \ -v ~/docker/www:/var/www \ -w /var/www \ php:fpm-alpine docker run -itd \ --restart unless-stopped \ --name mariadb \ --network backend \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=dbname \ mariadb