diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c879586..b1b1bcd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: pull_request: - schedule: - - cron: '0 18 * * *' - jobs: build: @@ -37,4 +34,4 @@ jobs: email: ${{ secrets.DOCKER_EMAIL }} - name: Push Docker Images - run: scripts/push.sh \ No newline at end of file + run: scripts/push.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4500d..b8d36b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ ## [Unreleased](https://github.com/chrisnharvey/magicLAMP/compare/master...develop) +## v1.3.0 + +### New + +- Added ngrok to workspace container ([#33](https://github.com/chrisnharvey/magicLAMP/issues/33), [437e5ce](https://github.com/chrisnharvey/magicLAMP/commit/437e5cea445ecb0bf128f45cdf69ee92ba745ac3)) + +### Improved + +- PHP and Node versions are now shown in shell ([#9](https://github.com/chrisnharvey/magicLAMP/issues/9), [4dfa7b6](https://github.com/chrisnharvey/magicLAMP/commit/4dfa7b6db036be15c25db70079ec76cb18bcfecf)) +- Added temporary upgrade script to prevent upgrade issues ([fdd6c98](https://github.com/chrisnharvey/magicLAMP/commit/fdd6c987d353739a54d1852fecd25e28fdcb6d06)) + ## v1.2.0 ### New @@ -9,7 +20,7 @@ - Memcached container is now included ([#24](https://github.com/chrisnharvey/magicLAMP/issues/24), [28aabe0](https://github.com/chrisnharvey/magicLAMP/commit/28aabe0b2a7fd9464406e8101c0fa4a34b6cb45e)) - RabbitMQ container is now included ([#25](https://github.com/chrisnharvey/magicLAMP/issues/25), [37845da](https://github.com/chrisnharvey/magicLAMP/commit/37845da9ba4413a4d87ac8daff9569a9b0fb2f00)) - Memcached extension is now installed for all PHP versions ([2991644](https://github.com/chrisnharvey/magicLAMP/commit/2991644e17e94f4c72520ed918ae3b564ab7e64d)) -- DNS resolver is now included ([#26#](https://github.com/chrisnharvey/magicLAMP/issues/26), [9efcbfa](https://github.com/chrisnharvey/magicLAMP/commit/9efcbfa2ef24a83f8a3cfcedf105c91cbd546a63)) +- DNS resolver is now included ([#26](https://github.com/chrisnharvey/magicLAMP/issues/26), [9efcbfa](https://github.com/chrisnharvey/magicLAMP/commit/9efcbfa2ef24a83f8a3cfcedf105c91cbd546a63)) ### Improved @@ -44,4 +55,4 @@ ## v1.0.0 -Initial release \ No newline at end of file +Initial release diff --git a/README.md b/README.md index ddcf626..60f8ec2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Build status Documentation Status Author -Latest version +Latest version License

diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..1554087 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,95 @@ +# Security Policy + +If you discover a security vulnerability in magicLAMP, please **do not** report it publicly. Instead, +please see the guide below. + +## Supported Versions + +Only the latest version of magicLAMP is supported. It is therefore recommended that you keep magicLAMP up-to-date. + +## Reporting a Vulnerability + +If you discover a security vulnerability in magicLAMP, please report it to Chris Harvey at chris@chrisnharvey.com. + +**All security issues will be promptly addressed.** + +### Public PGP Key + +``` +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: Keybase OpenPGP v2.0.58 +Comment: https://keybase.io/crypto + +xsFNBFfubEcBEACw2Bj5BB5ceQERO5brfATjLDSw7Bgnyf4lVkQPi8+/v4k+a8+b ++d8CHiASL3NuzRfqblYN7/a6ExGVyZuB4ldLL3q7ZetO+Qpe5nou3n0agwLWiFaE +KYY29gXQp5hxM+XdbozhhyoyQ+6beRncaKqorhdTcOeag1TPWECVI345dNoddHs1 +futE2bne4C3TH801VEdkUzKDgiDqj282g7rMlybHI6EQUaaauRRkRulKPdP3Vxcx +S4BXeTdz0uaXGkixVsIQ5mlBzyFr/Sv3WFR4YIdFDc/f3Yb7uzQD8RRbMxa2rBOI +UE1f22DvinkYULZUJCLSOYHCnYd4I8naldU7M65dlN5hw2IbHvYGsaGuSSqx2Qvg +L6S3SRF8ePrxvkXU5O1CBfb8RcYuvuYqRyT8v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thDNSIpVkDx0zL4LCEL5wo+aAxCMMRd7U4xji18pgX +ueNq/Wbojyis3YwmlvHUpboEOnXjRmxreoShyg9vg51VB4cezSiYXHcAVeF8uGkE +FwRLYCUY6Vj+to5vDm/aJ2ArYxj5SbUkFXp00YgTC/0A6sSfmSyCzmSlQOkTfQLE +bU1RH65nK0VkxQ//V8ZvCdpfmpyNcjtKLfYL0N3ieCe/sWswoCcz49hwqEUVNMaC +ex/hm/eCU4anU6eq/Iz16R0QCL4hd9HGBU7B79R6GlewkR7zINLzVmUj5Mqb9d3w +iQLpbWRpcp8rK3rpQ3KBaSMo7Xt2Ct1frgEhEIsaYN8uSFs7fwxexPbc8C7jq3V0 +aZyN1ujZjGpE3W3Tuf0Zqlh8RuZ4rqI+9Jwhsh+xZ9iVkSRKgNh5yVlnLwWxpauZ +B+cAbzJWxWZ4RGTzm9+luHI8WAXxbQiJrlI5K0EP345F06EwwTFUwbxN5qB29F7C +TX/cqli18NSAFtMj8opRKRkd+uJ8uu5MCIE+m6FPaItiI/3+QR5r01TIpRQ8YHMI +pSHchAKeVpzerWvY+pzbB4WkwlA9TfaoQIb6o40bvjtaf8Et9wv4/9kBPiEq8u3+ +ptxZWau4757fmN+5raXL+Ozd/JU0mXYMGIHJNXV5TYlx+pVqu6G/+fGiq2n30KC6 +wF8eCrq884oSyhEa1kM+AKfbi/TFDl5JYwhoEhQbvCuDwzh6hPG4g1IIydcG1hsg +wx4PnjEaf/lq2mFPenX6Gzm1j/2/CTun3T8hfjqYK2dcYkj/+ydA6vgUvPeKQw4e +yzvnk31v4uZayPZ7Ls4UNL9Rxk+GuXm6EUJJvlfTZV7etnyskl7H3lpbKwM= +=j6G9 +-----END PGP PUBLIC KEY BLOCK----- +``` diff --git a/containers/custom/.gitkeep b/containers/custom/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/containers/default/php56/Dockerfile b/containers/default/php56/Dockerfile deleted file mode 100644 index f74cb53..0000000 --- a/containers/default/php56/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM php:5.6-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath -RUN pecl install swoole-2.0.10 --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached-2.2.0 - -RUN docker-php-ext-enable opcache swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php70/Dockerfile b/containers/default/php70/Dockerfile deleted file mode 100644 index 7004014..0000000 --- a/containers/default/php70/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM php:7.0-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath - -RUN pecl install imagick -RUN pecl install swoole-4.3.6 --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached - -RUN docker-php-ext-enable imagick opcache swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php71/Dockerfile b/containers/default/php71/Dockerfile deleted file mode 100644 index 2acc203..0000000 --- a/containers/default/php71/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM php:7.1-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath - -RUN pecl install imagick -RUN pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached - -RUN docker-php-ext-enable imagick opcache swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php72/Dockerfile b/containers/default/php72/Dockerfile deleted file mode 100644 index a4b773f..0000000 --- a/containers/default/php72/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM php:7.2-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath - -RUN pecl install imagick -RUN pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached - -RUN docker-php-ext-enable imagick opcache sodium swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php73/Dockerfile b/containers/default/php73/Dockerfile deleted file mode 100644 index 46eb800..0000000 --- a/containers/default/php73/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM php:7.3-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath - -RUN pecl install imagick -RUN pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached - -RUN docker-php-ext-enable imagick opcache sodium swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php74/Dockerfile b/containers/default/php74/Dockerfile deleted file mode 100644 index 0be4f77..0000000 --- a/containers/default/php74/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM php:7.4-fpm - -RUN apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev - -RUN docker-php-ext-install -j$(nproc) iconv -RUN docker-php-ext-configure gd -RUN docker-php-ext-install -j$(nproc) gd - -RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath - -RUN pecl install imagick -RUN pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer -RUN pecl install memcached - -RUN docker-php-ext-enable imagick opcache sodium swoole memcached - -ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini -ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/workspace/magicLAMP.sh b/containers/default/workspace/magicLAMP.sh deleted file mode 100644 index 0437672..0000000 --- a/containers/default/workspace/magicLAMP.sh +++ /dev/null @@ -1,14 +0,0 @@ -export SHELL=/bin/zsh -export DEFAULT_USER="$(whoami)" - -cat /usr/src/magicLAMP/magicLAMP.art -source /magicLAMP/.env - -NEW_VERSION=$DEFAULT_PHP_VERSION -SESSION_SWITCH=1 -source /usr/src/magicLAMP/switch-php-version - -git config --global oh-my-zsh.hide-status 1 -git config --global oh-my-zsh.hide-dirty 1 -git config --global user.name "${GIT_NAME}" -git config --global user.email "${GIT_EMAIL}" diff --git a/containers/default/dns-internal/Dockerfile b/containers/dns-internal/Dockerfile similarity index 100% rename from containers/default/dns-internal/Dockerfile rename to containers/dns-internal/Dockerfile diff --git a/containers/default/dns-internal/config/dnsmasq.conf b/containers/dns-internal/config/dnsmasq.conf similarity index 100% rename from containers/default/dns-internal/config/dnsmasq.conf rename to containers/dns-internal/config/dnsmasq.conf diff --git a/containers/default/dns/Dockerfile b/containers/dns/Dockerfile similarity index 100% rename from containers/default/dns/Dockerfile rename to containers/dns/Dockerfile diff --git a/containers/default/dns/config/dnsmasq.conf b/containers/dns/config/dnsmasq.conf similarity index 100% rename from containers/default/dns/config/dnsmasq.conf rename to containers/dns/config/dnsmasq.conf diff --git a/containers/default/elasticsearch/Dockerfile b/containers/elasticsearch/Dockerfile similarity index 100% rename from containers/default/elasticsearch/Dockerfile rename to containers/elasticsearch/Dockerfile diff --git a/containers/default/mailcatcher/Dockerfile b/containers/mailcatcher/Dockerfile similarity index 100% rename from containers/default/mailcatcher/Dockerfile rename to containers/mailcatcher/Dockerfile diff --git a/containers/default/memcached/Dockerfile b/containers/memcached/Dockerfile similarity index 100% rename from containers/default/memcached/Dockerfile rename to containers/memcached/Dockerfile diff --git a/containers/default/mysql/Dockerfile b/containers/mysql/Dockerfile similarity index 100% rename from containers/default/mysql/Dockerfile rename to containers/mysql/Dockerfile diff --git a/containers/default/nginx/Dockerfile b/containers/nginx/Dockerfile similarity index 60% rename from containers/default/nginx/Dockerfile rename to containers/nginx/Dockerfile index f0290a8..f8e1dfc 100644 --- a/containers/default/nginx/Dockerfile +++ b/containers/nginx/Dockerfile @@ -3,10 +3,9 @@ FROM nginx:latest ADD ./config/nginx.conf /etc/nginx/conf.d/vhosts.conf ADD ./config/ssl.ext /etc/nginx/ssl.ext -RUN apt-get update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq openssl - -RUN mkdir /ca +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq openssl && \ + mkdir /ca ADD start.sh /start.sh diff --git a/containers/default/nginx/config/nginx.conf b/containers/nginx/config/nginx.conf similarity index 100% rename from containers/default/nginx/config/nginx.conf rename to containers/nginx/config/nginx.conf diff --git a/containers/default/nginx/config/ssl.ext b/containers/nginx/config/ssl.ext similarity index 100% rename from containers/default/nginx/config/ssl.ext rename to containers/nginx/config/ssl.ext diff --git a/containers/default/nginx/start.sh b/containers/nginx/start.sh similarity index 100% rename from containers/default/nginx/start.sh rename to containers/nginx/start.sh diff --git a/containers/default/pgadmin/Dockerfile b/containers/pgadmin/Dockerfile similarity index 100% rename from containers/default/pgadmin/Dockerfile rename to containers/pgadmin/Dockerfile diff --git a/containers/php56/Dockerfile b/containers/php56/Dockerfile new file mode 100644 index 0000000..2859ed7 --- /dev/null +++ b/containers/php56/Dockerfile @@ -0,0 +1,14 @@ +FROM php:5.6-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install swoole-2.0.10 --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached-2.2.0 && \ + docker-php-ext-enable opcache swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php56/config/php-fpm.conf b/containers/php56/config/php-fpm.conf similarity index 100% rename from containers/default/php56/config/php-fpm.conf rename to containers/php56/config/php-fpm.conf diff --git a/containers/default/php56/config/php.ini b/containers/php56/config/php.ini similarity index 100% rename from containers/default/php56/config/php.ini rename to containers/php56/config/php.ini diff --git a/containers/php70/Dockerfile b/containers/php70/Dockerfile new file mode 100644 index 0000000..2b23bad --- /dev/null +++ b/containers/php70/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.0-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install imagick && \ + pecl install swoole-4.3.6 --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached && \ + docker-php-ext-enable imagick opcache swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php70/config/php-fpm.conf b/containers/php70/config/php-fpm.conf similarity index 100% rename from containers/default/php70/config/php-fpm.conf rename to containers/php70/config/php-fpm.conf diff --git a/containers/default/php70/config/php.ini b/containers/php70/config/php.ini similarity index 100% rename from containers/default/php70/config/php.ini rename to containers/php70/config/php.ini diff --git a/containers/php71/Dockerfile b/containers/php71/Dockerfile new file mode 100644 index 0000000..cb30885 --- /dev/null +++ b/containers/php71/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.1-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install imagick && \ + pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached && \ + docker-php-ext-enable imagick opcache swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php71/config/php-fpm.conf b/containers/php71/config/php-fpm.conf similarity index 100% rename from containers/default/php71/config/php-fpm.conf rename to containers/php71/config/php-fpm.conf diff --git a/containers/default/php71/config/php.ini b/containers/php71/config/php.ini similarity index 100% rename from containers/default/php71/config/php.ini rename to containers/php71/config/php.ini diff --git a/containers/php72/Dockerfile b/containers/php72/Dockerfile new file mode 100644 index 0000000..fb72432 --- /dev/null +++ b/containers/php72/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.2-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install imagick && \ + pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached && \ + docker-php-ext-enable imagick opcache sodium swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php72/config/php-fpm.conf b/containers/php72/config/php-fpm.conf similarity index 100% rename from containers/default/php72/config/php-fpm.conf rename to containers/php72/config/php-fpm.conf diff --git a/containers/default/php72/config/php.ini b/containers/php72/config/php.ini similarity index 100% rename from containers/default/php72/config/php.ini rename to containers/php72/config/php.ini diff --git a/containers/php73/Dockerfile b/containers/php73/Dockerfile new file mode 100644 index 0000000..79aa67b --- /dev/null +++ b/containers/php73/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.3-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install imagick && \ + pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached && \ + docker-php-ext-enable imagick opcache sodium swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php73/config/php-fpm.conf b/containers/php73/config/php-fpm.conf similarity index 100% rename from containers/default/php73/config/php-fpm.conf rename to containers/php73/config/php-fpm.conf diff --git a/containers/default/php73/config/php.ini b/containers/php73/config/php.ini similarity index 100% rename from containers/default/php73/config/php.ini rename to containers/php73/config/php.ini diff --git a/containers/php74/Dockerfile b/containers/php74/Dockerfile new file mode 100644 index 0000000..2093f93 --- /dev/null +++ b/containers/php74/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.4-fpm + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -qq libpq-dev libmagickwand-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev nghttp2 libhiredis-dev libmemcached-dev pkg-config zlib1g-dev && \ + docker-php-ext-install -j$(nproc) iconv && \ + docker-php-ext-configure gd && \ + docker-php-ext-install -j$(nproc) gd && \ + docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql zip bcmath && \ + pecl install imagick && \ + pecl install swoole --enable-sockets --enable-openssl --enable-http2 --enable-async-redis --enable-timewheel --enable-mysqlnd --enable-ringbuffer && \ + pecl install memcached && \ + docker-php-ext-enable imagick opcache sodium swoole memcached + +ADD ./config/php.ini /usr/local/etc/php/conf.d/php.ini +ADD ./config/php-fpm.conf /usr/local/etc/php-fpm.d/zzz-magicLAMP.conf \ No newline at end of file diff --git a/containers/default/php74/config/php-fpm.conf b/containers/php74/config/php-fpm.conf similarity index 100% rename from containers/default/php74/config/php-fpm.conf rename to containers/php74/config/php-fpm.conf diff --git a/containers/default/php74/config/php.ini b/containers/php74/config/php.ini similarity index 100% rename from containers/default/php74/config/php.ini rename to containers/php74/config/php.ini diff --git a/containers/default/phpmyadmin/Dockerfile b/containers/phpmyadmin/Dockerfile similarity index 100% rename from containers/default/phpmyadmin/Dockerfile rename to containers/phpmyadmin/Dockerfile diff --git a/containers/default/postgres/Dockerfile b/containers/postgres/Dockerfile similarity index 100% rename from containers/default/postgres/Dockerfile rename to containers/postgres/Dockerfile diff --git a/containers/default/rabbitmq/Dockerfile b/containers/rabbitmq/Dockerfile similarity index 100% rename from containers/default/rabbitmq/Dockerfile rename to containers/rabbitmq/Dockerfile diff --git a/containers/default/redis/Dockerfile b/containers/redis/Dockerfile similarity index 100% rename from containers/default/redis/Dockerfile rename to containers/redis/Dockerfile diff --git a/containers/default/selenium-chrome/Dockerfile b/containers/selenium-chrome/Dockerfile similarity index 100% rename from containers/default/selenium-chrome/Dockerfile rename to containers/selenium-chrome/Dockerfile diff --git a/containers/default/selenium-firefox/Dockerfile b/containers/selenium-firefox/Dockerfile similarity index 100% rename from containers/default/selenium-firefox/Dockerfile rename to containers/selenium-firefox/Dockerfile diff --git a/containers/default/workspace/Dockerfile b/containers/workspace/Dockerfile similarity index 74% rename from containers/default/workspace/Dockerfile rename to containers/workspace/Dockerfile index dd0b079..6918e22 100644 --- a/containers/default/workspace/Dockerfile +++ b/containers/workspace/Dockerfile @@ -1,61 +1,72 @@ FROM ubuntu:18.04 -# Update apt repos then install curl and software-properties common so we can add ppas +# Update apt repos then install curl, software-properties-common and PHP ppa RUN apt-get update && \ - apt-get install -qq curl software-properties-common - -# Add PHP ppa -RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y + apt-get install -qq curl software-properties-common && \ + LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y # Add Docker repo -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -RUN apt-key fingerprint 0EBFCD88 -RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ + apt-key fingerprint 0EBFCD88 && \ + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # Install required packages -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq curl putty-tools mysql-client sqlite python3-pip unzip bzip2 wget git git-lfs ssh sudo nano vim zsh apt-transport-https ca-certificates curl gnupg-agent php5.6 php5.6-imagick php5.6-bcmath php5.6-sqlite php5.6-gd php5.6-mysql php5.6-pgsql php5.6-dev php5.6-zip php5.6-dom php5.6-curl php5.6-mbstring php7.0 php7.0-imagick php7.0-bcmath php7.0-sqlite php7.0-gd php7.0-mysql php7.0-pgsql php7.0-dev php7.0-zip php7.0-dom php7.0-curl php7.0-mbstring php7.1 php7.1-imagick php7.1-bcmath php7.1-sqlite php7.1-gd php7.1-mysql php7.1-pgsql php7.1-dev php7.1-zip php7.1-dom php7.1-curl php7.1-mbstring php7.2 php7.2-imagick php7.2-bcmath php7.2-sqlite php7.2-gd php7.2-mysql php7.2-pgsql php7.2-dev php7.2-zip php7.2-dom php7.2-curl php7.2-mbstring php7.3 php7.3-imagick php7.3-bcmath php7.3-sqlite php7.3-gd php7.3-mysql php7.3-pgsql php7.3-dev php7.3-zip php7.3-dom php7.3-curl php7.3-mbstring php7.4 php7.4-imagick php7.4-bcmath php7.4-sqlite php7.4-gd php7.4-mysql php7.4-pgsql php7.4-dev php7.4-zip php7.4-dom php7.4-curl php7.4-mbstring libhiredis-dev nghttp2 libmemcached-dev pkg-config zlib1g-dev docker-ce-cli docker-compose redis-tools iputils-ping screen +RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq curl putty-tools mysql-client sqlite python3-pip unzip bzip2 wget git git-lfs ssh sudo nano vim zsh apt-transport-https ca-certificates curl gnupg-agent php5.6-cli php5.6-imagick php5.6-bcmath php5.6-sqlite php5.6-gd php5.6-mysql php5.6-pgsql php5.6-dev php5.6-zip php5.6-dom php5.6-curl php5.6-mbstring php7.0-cli php7.0-imagick php7.0-bcmath php7.0-sqlite php7.0-gd php7.0-mysql php7.0-pgsql php7.0-dev php7.0-zip php7.0-dom php7.0-curl php7.0-mbstring php7.1-cli php7.1-imagick php7.1-bcmath php7.1-sqlite php7.1-gd php7.1-mysql php7.1-pgsql php7.1-dev php7.1-zip php7.1-dom php7.1-curl php7.1-mbstring php7.2-cli php7.2-imagick php7.2-bcmath php7.2-sqlite php7.2-gd php7.2-mysql php7.2-pgsql php7.2-dev php7.2-zip php7.2-dom php7.2-curl php7.2-mbstring php7.3-cli php7.3-imagick php7.3-bcmath php7.3-sqlite php7.3-gd php7.3-mysql php7.3-pgsql php7.3-dev php7.3-zip php7.3-dom php7.3-curl php7.3-mbstring php7.4-cli php7.4-imagick php7.4-bcmath php7.4-sqlite php7.4-gd php7.4-mysql php7.4-pgsql php7.4-dev php7.4-zip php7.4-dom php7.4-curl php7.4-mbstring libhiredis-dev nghttp2 libmemcached-dev pkg-config zlib1g-dev docker-ce-cli docker-compose redis-tools iputils-ping screen # Add magicLAMP user -RUN useradd magicLAMP -m -s /bin/zsh +RUN useradd magicLAMP -m -s /bin/zsh && \ + echo "magicLAMP ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers ADD --chown=magicLAMP:magicLAMP ./home /home/magicLAMP -RUN echo "magicLAMP ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers -RUN mkdir /opt/magicLAMP +# Add the default magicLAMP zshrc file +ADD ./home/.zshrc /usr/src/magicLAMP/.zshrc + +ADD ./update.sh /usr/src/magicLAMP/update.sh +RUN chmod +x /usr/src/magicLAMP/update.sh # Install oh-my-zsh -RUN ZSH=/opt/magicLAMP/oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +RUN mkdir /opt/magicLAMP && \ + ZSH=/opt/magicLAMP/oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended # Add oh-my-zsh plugins -RUN git clone https://github.com/zsh-users/zsh-autosuggestions /opt/magicLAMP/oh-my-zsh/plugins/zsh-autosuggestions -RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /opt/magicLAMP/oh-my-zsh/plugins/zsh-syntax-highlighting +RUN git clone https://github.com/zsh-users/zsh-autosuggestions /opt/magicLAMP/oh-my-zsh/plugins/zsh-autosuggestions && \ + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /opt/magicLAMP/oh-my-zsh/plugins/zsh-syntax-highlighting # Make magicLAMP own /opt/magicLAMP RUN chown magicLAMP:magicLAMP -R /opt/magicLAMP +RUN git clone https://github.com/eduardnikolenko/minima.git "/opt/magicLAMP/oh-my-zsh/custom/themes/minima" && \ + ln -s "/opt/magicLAMP/oh-my-zsh/custom/themes/minima/minima.zsh-theme" "/opt/magicLAMP/oh-my-zsh/custom/themes/minima.zsh-theme" + +# Install ngrok +RUN wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -O /tmp/ngrok.zip && \ + unzip /tmp/ngrok.zip && \ + mv ngrok /usr/local/bin + # Install AWS CLI RUN pip3 install awscli # Install Kubernetes -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl -RUN mv kubectl /usr/local/bin -RUN chmod +x /usr/local/bin/kubectl +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \ + mv kubectl /usr/local/bin && \ + chmod +x /usr/local/bin/kubectl # Install eksctl -RUN curl --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp -RUN mv /tmp/eksctl /usr/local/bin +RUN curl --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp && \ + mv /tmp/eksctl /usr/local/bin # Install doctl -RUN curl --location https://github.com/digitalocean/doctl/releases/download/v1.41.0/doctl-1.41.0-linux-amd64.tar.gz | tar xz -C /tmp -RUN mv /tmp/doctl /usr/local/bin +RUN curl --location https://github.com/digitalocean/doctl/releases/download/v1.41.0/doctl-1.41.0-linux-amd64.tar.gz | tar xz -C /tmp && \ + mv /tmp/doctl /usr/local/bin # Install Stripe CLI -RUN curl --location "https://github.com/stripe/stripe-cli/releases/download/v1.4.0/stripe_1.4.0_linux_x86_64.tar.gz" | tar xz -C /tmp -RUN mv /tmp/stripe /usr/local/bin/stripe -RUN chmod +x /usr/local/bin/stripe +RUN curl --location "https://github.com/stripe/stripe-cli/releases/download/v1.4.0/stripe_1.4.0_linux_x86_64.tar.gz" | tar xz -C /tmp && \ + mv /tmp/stripe /usr/local/bin/stripe && \ + chmod +x /usr/local/bin/stripe # Install nvm and LTS NodeJS -RUN runuser -l magicLAMP -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | zsh" -RUN runuser -l magicLAMP -c "source /home/magicLAMP/.zshrc && nvm install --lts" +RUN runuser -l magicLAMP -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | zsh" && \ + runuser -l magicLAMP -c "source /home/magicLAMP/.zshrc && nvm install --lts" # Remove any default PHP versions RUN update-alternatives --remove-all php && \ @@ -65,12 +76,7 @@ RUN update-alternatives --remove-all php && \ update-alternatives --remove-all phar.phar ADD php/switch-php-version /usr/src/magicLAMP/switch-php-version -ADD php/5.6 /usr/bin/5.6 -ADD php/7.0 /usr/bin/7.0 -ADD php/7.1 /usr/bin/7.1 -ADD php/7.2 /usr/bin/7.2 -ADD php/7.3 /usr/bin/7.3 -ADD php/7.4 /usr/bin/7.4 +ADD php/5.6 php/7.0 php/7.1 php/7.2 php/7.3 php/7.4 /usr/bin/ # Make PHP version switchers executable RUN chmod +x /usr/bin/5.6 && \ @@ -80,16 +86,14 @@ RUN chmod +x /usr/bin/5.6 && \ chmod +x /usr/bin/7.3 && \ chmod +x /usr/bin/7.4 -# Create directory for each PHP version +# Symlink PHP versons into a directory so they can be used in PATH RUN mkdir -p /opt/magicLAMP/php/5.6 && \ mkdir -p /opt/magicLAMP/php/7.0 && \ mkdir -p /opt/magicLAMP/php/7.1 && \ mkdir -p /opt/magicLAMP/php/7.2 && \ mkdir -p /opt/magicLAMP/php/7.3 && \ - mkdir -p /opt/magicLAMP/php/7.4 - -# Symlink PHP versons into a directory so they can be used in PATH -RUN ln -s /usr/bin/php5.6 /opt/magicLAMP/php/5.6/php && \ + mkdir -p /opt/magicLAMP/php/7.4 && \ + ln -s /usr/bin/php5.6 /opt/magicLAMP/php/5.6/php && \ ln -s /usr/bin/phpize5.6 /opt/magicLAMP/php/5.6/phpize && \ ln -s /usr/bin/phar5.6 /opt/magicLAMP/php/5.6/phar && \ ln -s /usr/bin/phar.phar5.6 /opt/magicLAMP/php/5.6/phar.phar && \ @@ -179,8 +183,7 @@ RUN runuser -l magicLAMP -c "mkdir -p /opt/magicLAMP/composer/5.6" && \ runuser -l magicLAMP -c "cd /opt/magicLAMP/composer/7.4 && 7.4 composer require laravel/installer psy/psysh:@stable" # Add magicLAMP shell scripts -ADD magicLAMP.art /usr/src/magicLAMP/magicLAMP.art -ADD magicLAMP.sh /usr/src/magicLAMP/magicLAMP.sh +ADD magicLAMP.art magicLAMP.sh /usr/src/magicLAMP/ # Run magicLAMP shell script in zshrc RUN echo "source /usr/src/magicLAMP/magicLAMP.sh" >> /etc/zsh/zshrc diff --git a/containers/workspace/home/.magiclamprc b/containers/workspace/home/.magiclamprc new file mode 100644 index 0000000..9defce1 --- /dev/null +++ b/containers/workspace/home/.magiclamprc @@ -0,0 +1 @@ +MAGICLAMP_VERSION="1.3" \ No newline at end of file diff --git a/containers/default/workspace/home/.zshrc b/containers/workspace/home/.zshrc similarity index 92% rename from containers/default/workspace/home/.zshrc rename to containers/workspace/home/.zshrc index 4e200f5..5ad2d6e 100644 --- a/containers/default/workspace/home/.zshrc +++ b/containers/workspace/home/.zshrc @@ -1,15 +1,11 @@ # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH -# Path to your oh-my-zsh installation. -export ZSH="/opt/magicLAMP/oh-my-zsh" - # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -#ZSH_THEME="robbyrussell" -ZSH_THEME="eastwood" +# ZSH_THEME="minima" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load @@ -28,7 +24,7 @@ ZSH_THEME="eastwood" # DISABLE_AUTO_UPDATE="true" # Uncomment the following line to automatically update without prompting. -DISABLE_UPDATE_PROMPT="true" +# DISABLE_UPDATE_PROMPT="true" # Uncomment the following line to change how often to auto-update (in days). # export UPDATE_ZSH_DAYS=13 @@ -69,9 +65,7 @@ DISABLE_UPDATE_PROMPT="true" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git zsh-autosuggestions zsh-syntax-highlighting laravel node npm) - -source $ZSH/oh-my-zsh.sh +# plugins=(git zsh-autosuggestions zsh-syntax-highlighting laravel node npm) # User configuration diff --git a/containers/default/workspace/install-composer.sh b/containers/workspace/install-composer.sh similarity index 100% rename from containers/default/workspace/install-composer.sh rename to containers/workspace/install-composer.sh diff --git a/containers/default/workspace/magicLAMP.art b/containers/workspace/magicLAMP.art similarity index 100% rename from containers/default/workspace/magicLAMP.art rename to containers/workspace/magicLAMP.art diff --git a/containers/workspace/magicLAMP.sh b/containers/workspace/magicLAMP.sh new file mode 100644 index 0000000..6688f76 --- /dev/null +++ b/containers/workspace/magicLAMP.sh @@ -0,0 +1,79 @@ +# Run magicLAMP update script +sudo /opt/magicLAMP/update.sh + +# Set default shell to zsh +export SHELL=/bin/zsh + +# Set deault user to magicLAMP +export DEFAULT_USER="magicLAMP" + +# Show the magicLAMP art +cat /usr/src/magicLAMP/magicLAMP.art + +# Make .env vars available in the shell +source /magicLAMP/.env + +# Set the active PHP version to the default specified in .env +NEW_VERSION=$DEFAULT_PHP_VERSION +SESSION_SWITCH=1 +source /usr/src/magicLAMP/switch-php-version + +# Set user git configs from .env file +git config --global user.name "${GIT_NAME}" +git config --global user.email "${GIT_EMAIL}" + +# Path to your oh-my-zsh installation. +export ZSH="/opt/magicLAMP/oh-my-zsh" + +# Set default theme to magiclamp +ZSH_THEME="minima" + +# Uncomment the following line to automatically update without prompting. +DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Which plugins would you like to load? +# Standard plugins can be found in ~/.oh-my-zsh/plugins/* +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git zsh-autosuggestions zsh-syntax-highlighting laravel node npm) + +source $ZSH/oh-my-zsh.sh + +# Set default editor to nano for simplicity +export EDITOR='nano' + +# zsh prompt order +MINIMA_PROMPT_ORDER=( + php + node + git + dir + exit_code + char +) + +# zsh theme config +MINIMA_PHP_SYMBOL="PHP " +MINIMA_PHP_COLOR="cyan" +MINIMA_PHP_PREFIX="" +MINIMA_NODE_SYMBOL="Node " +MINIMA_NODE_PREFIX="" +MINIMA_GIT_BRANCH_SYMBOL="" +MINIMA_GIT_STATUS_DELETED="x" +MINIMA_GIT_STATUS_AHEAD=">" +MINIMA_GIT_STATUS_BEHIND="<" +MINIMA_CHAR_SYMBOL="$" +MINIMA_DIR_PREFIX="" +MINIMA_DIR_COLOR="yellow" +MINIMA_EXIT_CODE_SYMBOL="Exit: " + +# nvm +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/containers/default/workspace/php/5.6 b/containers/workspace/php/5.6 similarity index 100% rename from containers/default/workspace/php/5.6 rename to containers/workspace/php/5.6 diff --git a/containers/default/workspace/php/7.0 b/containers/workspace/php/7.0 similarity index 100% rename from containers/default/workspace/php/7.0 rename to containers/workspace/php/7.0 diff --git a/containers/default/workspace/php/7.1 b/containers/workspace/php/7.1 similarity index 100% rename from containers/default/workspace/php/7.1 rename to containers/workspace/php/7.1 diff --git a/containers/default/workspace/php/7.2 b/containers/workspace/php/7.2 similarity index 100% rename from containers/default/workspace/php/7.2 rename to containers/workspace/php/7.2 diff --git a/containers/default/workspace/php/7.3 b/containers/workspace/php/7.3 similarity index 100% rename from containers/default/workspace/php/7.3 rename to containers/workspace/php/7.3 diff --git a/containers/default/workspace/php/7.4 b/containers/workspace/php/7.4 similarity index 100% rename from containers/default/workspace/php/7.4 rename to containers/workspace/php/7.4 diff --git a/containers/default/workspace/php/switch-php-version b/containers/workspace/php/switch-php-version similarity index 100% rename from containers/default/workspace/php/switch-php-version rename to containers/workspace/php/switch-php-version diff --git a/containers/workspace/update.sh b/containers/workspace/update.sh new file mode 100644 index 0000000..2d47970 --- /dev/null +++ b/containers/workspace/update.sh @@ -0,0 +1,15 @@ +MAGICLAMP_VERSION="0" + +if [ -f /home/magicLAMP/.magiclamprc ]; then + . /home/magicLAMP/.magiclamprc +fi + +# Update to 1.3 +if [ $MAGICLAMP_VERSION \< "1.3" ]; then + rm -f /home/magicLAMP/.zshrc + cp /usr/src/magicLAMP/.zshrc /home/magicLAMP/.zshrc + chown magicLAMP:magicLAMP /home/magicLAMP/.zshrc + + echo "MAGICLAMP_VERSION=\"1.3\"" > /home/magicLAMP/.magiclamprc +fi + diff --git a/docker-compose.yml b/docker-compose.yml index 278190d..77366ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: nginx: - image: chrisnharvey/magiclamp-nginx:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-nginx:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -17,7 +17,7 @@ services: ipv4_address: 10.0.10.10 postgres: - image: chrisnharvey/magiclamp-postgres:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-postgres:${MAGICLAMP_VERSION:-1.3} ports: - 5432:5432 @@ -30,7 +30,7 @@ services: ipv4_address: 10.0.10.15 pgadmin: - image: chrisnharvey/magiclamp-pgadmin:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-pgadmin:${MAGICLAMP_VERSION:-1.3} networks: app_net: @@ -49,7 +49,7 @@ services: - dns_internal mysql: - image: chrisnharvey/magiclamp-mysql:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-mysql:${MAGICLAMP_VERSION:-1.3} volumes: - mysql_data:/var/lib/mysql @@ -67,7 +67,7 @@ services: ipv4_address: 10.0.10.20 phpmyadmin: - image: chrisnharvey/magiclamp-phpmyadmin:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-phpmyadmin:${MAGICLAMP_VERSION:-1.3} networks: app_net: @@ -80,7 +80,7 @@ services: - MYSQL_ROOT_PASSWORD=gg mailcatcher: - image: chrisnharvey/magiclamp-mailcatcher:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-mailcatcher:${MAGICLAMP_VERSION:-1.3} ports: - 1025:1025 @@ -90,7 +90,7 @@ services: ipv4_address: 10.0.10.25 workspace: - image: chrisnharvey/magiclamp-workspace:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-workspace:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -113,14 +113,14 @@ services: ipv4_address: 10.0.10.5 dns_internal: - image: chrisnharvey/magiclamp-dns-internal:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-dns-internal:${MAGICLAMP_VERSION:-1.3} networks: app_net: ipv4_address: 10.0.10.2 dns: - image: chrisnharvey/magiclamp-dns:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-dns:${MAGICLAMP_VERSION:-1.3} ports: - 127.0.0.1:53:53/udp @@ -129,7 +129,7 @@ services: redis: - image: chrisnharvey/magiclamp-redis:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-redis:${MAGICLAMP_VERSION:-1.3} ports: - 6379:6379 @@ -139,7 +139,7 @@ services: ipv4_address: 10.0.10.21 memcached: - image: chrisnharvey/magiclamp-memcached:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-memcached:${MAGICLAMP_VERSION:-1.3} ports: - 11211:11211 @@ -149,7 +149,7 @@ services: ipv4_address: 10.0.10.11 elasticsearch: - image: chrisnharvey/magiclamp-elasticsearch:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-elasticsearch:${MAGICLAMP_VERSION:-1.3} ports: - 9200:9200 @@ -163,7 +163,7 @@ services: ipv4_address: 10.0.10.92 rabbitmq: - image: chrisnharvey/magiclamp-rabbitmq:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-rabbitmq:${MAGICLAMP_VERSION:-1.3} hostname: magiclamp-rabbitmq @@ -183,7 +183,7 @@ services: ipv4_address: 10.0.10.67 selenium_chrome: - image: chrisnharvey/magiclamp-selenium-chrome:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-selenium-chrome:${MAGICLAMP_VERSION:-1.3} ports: - 4444:4444 @@ -202,7 +202,7 @@ services: - dns_internal selenium_firefox: - image: chrisnharvey/magiclamp-selenium-firefox:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-selenium-firefox:${MAGICLAMP_VERSION:-1.3} ports: - 5555:4444 @@ -221,7 +221,7 @@ services: - dns_internal php56: - image: chrisnharvey/magiclamp-php56:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php56:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -240,7 +240,7 @@ services: - dns_internal php70: - image: chrisnharvey/magiclamp-php70:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php70:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -259,7 +259,7 @@ services: - dns_internal php71: - image: chrisnharvey/magiclamp-php71:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php71:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -278,7 +278,7 @@ services: - dns_internal php72: - image: chrisnharvey/magiclamp-php72:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php72:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -297,7 +297,7 @@ services: - dns_internal php73: - image: chrisnharvey/magiclamp-php73:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php73:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects @@ -316,7 +316,7 @@ services: - dns_internal php74: - image: chrisnharvey/magiclamp-php74:${MAGICLAMP_VERSION:-1.2} + image: chrisnharvey/magiclamp-php74:${MAGICLAMP_VERSION:-1.3} volumes: - ${PROJECTS_DIR:-./data/projects}:/projects diff --git a/docs/ngrok/index.md b/docs/ngrok/index.md new file mode 100644 index 0000000..ce2038f --- /dev/null +++ b/docs/ngrok/index.md @@ -0,0 +1,17 @@ +# ngrok + +ngrok is a service that allows you to expose your local web server to anyone on the internet, +without having to configure port forwarding or firewall rules. ngrok will even generate a +URL for you to access your magicLAMP services from outside of your local network. + +## Exposing a site + +ngrok is installed in the workspace container. To expose a website, type the following +command. Replacing `mysite.74.localhost` with the magicLAMP URL that you want to expose. + +``` +ngrok http --host-header=mysite.74.localhost nginx:80 +``` + +ngrox will then give you a public URL that will give you access to your local site +from anywhere in the world. \ No newline at end of file diff --git a/docs/troubleshooting/dns-does-not-resolve.md b/docs/troubleshooting/dns-does-not-resolve.md deleted file mode 100644 index 960a5e6..0000000 --- a/docs/troubleshooting/dns-does-not-resolve.md +++ /dev/null @@ -1,23 +0,0 @@ -# DNS does not resolve - -On some systems, `.localhost` is not automatically resolved to `127.0.0.1`. - -This can be resolved by using a DNS resolver built-in to magicLAMP which will resolve -all `.localhost` addresses to `127.0.0.1`. - -This resolver is not enabled by default, but it can be enabled by renaming `docker-compose.override.dns.yml` -to `docker-compose.override.yml` followed by running `docker-compose up -d` in the terminal. - -You will then need to update your DNS resolver in the network settings of your operating system and -set the DNS server to `127.0.0.1`. - -## magicLAMP now fails to start on Ubuntu - -If you're running Ubuntu on your host system, you may run into an issue -where the dnsmasq_external container fails to start. This is because Ubuntu runs -the systemd-resolved DNS resolver which listens on port 53 which is required -by the magicLAMP DNS resolver. - -To work around this issue, you need to -[disable systemd-resolved](https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu) -on your system. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 4b04227..c8c7390 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,11 +62,10 @@ nav: - selenium/firefox.md - selenium/chrome.md + - ngrok: ngrok/index.md + - IDE Integration: - ide-integration/vscode.md - Extending magicLAMP: - - extending-magiclamp/docker-compose-overrides.md - - - Troubleshooting: - - troubleshooting/dns-does-not-resolve.md + - extending-magiclamp/docker-compose-overrides.md \ No newline at end of file diff --git a/scripts/build-all-parallel.sh b/scripts/build-all-parallel.sh index 8482599..0c06003 100755 --- a/scripts/build-all-parallel.sh +++ b/scripts/build-all-parallel.sh @@ -1,3 +1,3 @@ #!/bin/bash -ls -d ${BASH_SOURCE%/*}/../containers/default/* | parallel -j2 ${BASH_SOURCE%/*}/build.sh \ No newline at end of file +ls -d ${BASH_SOURCE%/*}/../containers/* | parallel -j2 ${BASH_SOURCE%/*}/build.sh \ No newline at end of file diff --git a/scripts/build-all.sh b/scripts/build-all.sh index ad6bb5b..2d31898 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -1,3 +1,3 @@ #!/bin/bash -ls -d ${BASH_SOURCE%/*}/../containers/default/* | ${BASH_SOURCE%/*}/build.sh \ No newline at end of file +ls -d ${BASH_SOURCE%/*}/../containers/* | ${BASH_SOURCE%/*}/build.sh \ No newline at end of file diff --git a/scripts/push.sh b/scripts/push.sh index 2db2d95..46fc75a 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -4,7 +4,7 @@ translateDockerTag -for container_path in ${BASH_SOURCE%/*}/../containers/default/* ; do +for container_path in ${BASH_SOURCE%/*}/../containers/* ; do container_name="chrisnharvey/magiclamp-$(basename $container_path)"