Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnharvey committed May 14, 2020
2 parents 8c58bea + 3187226 commit 9d24d63
Show file tree
Hide file tree
Showing 58 changed files with 805 additions and 415 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
MAGICLAMP_VERSION=1.1
PROJECTS_DIR=./data/projects
SSH_DIR=./data/ssh
DEFAULT_PHP_VERSION=7.2
GIT_NAME=magicLAMP
GIT_EMAIL=[email protected]
PGADMIN_EMAIL=[email protected]
PGADMIN_PASSWORD=magicLAMP
RABBITMQ_USERNAME=magiclamp
RABBITMQ_PASSWORD=magicLAMP
USER_UID=1000
USER_GID=1000
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
docker-compose.override.yml
data/*
!data/.gitkeep
conf/custom/*
!conf/custom/.gitkeep
containers/custom/*
!containers/custom/.gitkeep
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,30 @@

## [Unreleased](https://github.com/chrisnharvey/magicLAMP/compare/master...develop)

### v1.1.0
## v1.2.0

### New

- ElasticSearch is now included ([#21](https://github.com/chrisnharvey/magicLAMP/issues/21), [4effd1a](https://github.com/chrisnharvey/magicLAMP/commit/4effd1a97f6faac3b443642ab8f381812913b2b6))
- 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))

### Improved

- Git status is now disabled in zsh prompt to prevent hangs on Windows ([#30](https://github.com/chrisnharvey/magicLAMP/issues/30), [5568b8e](https://github.com/chrisnharvey/magicLAMP/commit/5568b8e2afc71d387629a7c5614319311c1b44d7))
- Workspace performance improved and image size reduced by reducing Docker layers ([a97bb17](https://github.com/chrisnharvey/magicLAMP/commit/a97bb17db2f62528966540aec8bf4a6c78f983bd))

### Fixed

- Fixed issue where node and npm would become unavailable when switching PHP version ([#31](https://github.com/chrisnharvey/magicLAMP/issues/31), [2a1c251](https://github.com/chrisnharvey/magicLAMP/commit/2a1c251b1c2ed7399dbabcc9c5071cef4fa1cd06))
- Postgres PHP driver is now included in the workspace ([e3e74f6](https://github.com/chrisnharvey/magicLAMP/commit/e3e74f61f618a0cb9ef1887772228c90d73692f9))

## v1.1.0

### New

- Elasticsearch is now included ([#21](https://github.com/chrisnharvey/magicLAMP/issues/21), [4effd1a](https://github.com/chrisnharvey/magicLAMP/commit/4effd1a97f6faac3b443642ab8f381812913b2b6))

### Improved

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ When submitting code changes to magicLAMP, please follow the following guideline

- **Document any change in behaviour** - Make sure the documentation and `README.md` is kept up-to-date.

- **Submit to the correct branch** - Bug fixes should be targeted branch for the latest stable version (e.g. 1.x). Only target the master branch if your you're fixing an issue that only exists in that branch.
- **Submit to the correct branch** - New features should be targeted at the `develop` branch, and hotfixes should target the `master` branch. We follow the [git-flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) workflow.

- **Create feature/fix specific branches** - Don't ask us to pull from your master branch.
- **Create feature/hotfix branches** - Don't ask us to pull from your master branch.

- **One pull request per feature/fix** - If you want to do more than one thing, send multiple pull requests.

Expand Down
66 changes: 29 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
# magicLAMP

[![Build](https://github.com/chrisnharvey/magicLAMP/workflows/Build/badge.svg)](https://github.com/chrisnharvey/magicLAMP/actions)
[![Documentation Status](https://readthedocs.org/projects/magiclamp/badge/?version=stable)](http://magiclamp.app/en/stable/?badge=stable)
[![Author](http://img.shields.io/badge/[email protected]?style=square)](https://twitter.com/chrisnharvey)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=square)](LICENSE)

magicLAMP is a simple docker setup that provides a modern LEMP stack based on official upstream containers.

## Goals of this project

- To use the official upstream containers (where possible) with minimal modifications
- To be easy to modify for your own needs
- To include tools that makes development faster

## Features

- [x] Nginx
- [x] Automatic virtual hosts
- [x] PHP 5.6 - 7.4
- [x] PHP version changes per-project
- [x] Workspace container with pre-installed dev tools
- [x] NodeJS with multiple version support via `nvm`
- [x] MySQL
- [x] phpMyAdmin
- [x] PostgreSQL
- [x] pgAdmin4
- [x] Redis
- [x] ElasticSearch
- [x] Auto DNS
- [x] Automatic Local SSL
- [x] Catch-all email with webmail (Mailcatcher)
- [x] Stripe CLI
- [x] Save shell history and contents of home directory
- [x] Selenium with VNC access for Chrome and Firefox
- [x] Ability to change/override config files
- [ ] Xdebug
<p align="center"><a href="https://magiclamp.app" target="_blank" rel="noopener"><img src="https://res.cloudinary.com/chrisnharvey/image/upload/v1589481387/magicLAMP_rdth7y.svg" width="400"></a></p>

<p align="center">
<a href="https://github.com/chrisnharvey/magicLAMP/actions"><img src="https://img.shields.io/github/workflow/status/chrisnharvey/magicLAMP/Build/master" alt="Build status"></a>
<a href="http://magiclamp.app/en/stable/?badge=stable"><img src="https://readthedocs.org/projects/magiclamp/badge/?version=stable" alt="Documentation Status"></a>
<a href="https://twitter.com/chrisnharvey"><img src="http://img.shields.io/badge/[email protected]?style=square" alt="Author"></a>
<a href="https://twitter.com/chrisnharvey"><img src="https://img.shields.io/github/v/release/chrisnharvey/magicLAMP" alt="Latest version"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=square" alt="License"></a>
</p>

## About magicLAMP

magicLAMP is a full PHP development environment that works like magic! ✨

- 🤩 Run **multiple PHP versions** (5.6 - 7.4) at the same time (no more restarting, or rebuilding)
- 🙌 **Automatic DNS resolution** (bye-bye `hosts` file)
- 🚀 **Automatic Virtual Host creation** (forget `apache.conf` or `nginx.conf`)
- 🔒 **Automatic and valid SSL certificates** (mixed content errors are a thing of the past)
- 💾 Pre-configured databases that are ready to use - **MySQL** - **PostgreSQL** - **Redis** - **Memcached**
- 📋 Pre-configured database management tools - **pgAdmin 4** - **phpMyAdmin** - **redis-cli**
- ✉️ Catch all **SMTP mail server with webmail** for testing emails locally
- 🔨 **Powerful workspace** with pre-installed dev tools
- 👀 **Selenium** for Firefox and Chrome with VNC access
- 🙏 Switchable versions of **NodeJS and npm** with **nvm**
- 🔍 Built-in **ElasticSearch**
- 🐇 Built-in **RabbitMQ** with management GUI
-**So much more**

## Install

Expand Down Expand Up @@ -67,6 +57,8 @@ The following DNS records are resolved automatically:
- redis.localhost
- mysql.localhost
- elasticsearch.localhost
- rabbitmq.localhost
- memcached.localhost
- phpmyadmin.localhost
- postgres.localhost
- pgadmin.localhost
Expand Down
Empty file removed conf/custom/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions containers/default/dns-internal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM jpillora/dnsmasq

ADD ./config/dnsmasq.conf /etc/dnsmasq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ address=/workspace.localhost/10.0.10.5
address=/postgres.localhost/10.0.10.15
address=/mysql.localhost/10.0.10.20
address=/redis.localhost/10.0.10.21
address=/memcached.localhost/10.0.10.11
address=/elasticsearch.localhost/10.0.10.92
address=/rabbitmq.localhost/10.0.10.67
address=/smtp.localhost/10.0.10.25
address=/chrome.localhost/10.0.10.30
address=/firefox.localhost/10.0.10.31
Expand Down
3 changes: 3 additions & 0 deletions containers/default/dns/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM jpillora/dnsmasq

ADD ./config/dnsmasq.conf /etc/dnsmasq.conf
File renamed without changes.
1 change: 0 additions & 1 deletion containers/default/dnsmasq/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions containers/default/memcached/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM memcached:1.6
3 changes: 3 additions & 0 deletions containers/default/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
server {
server_name dns.localhost;

location / {
proxy_pass http://10.0.10.53:8080;
}
}

server {
server_name rabbitmq.localhost;

location / {
proxy_pass http://10.0.10.67:15672;
}
}

server {
server_name pgadmin.localhost;

Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php56/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ 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
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
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
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php70/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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
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/
Expand All @@ -12,5 +12,9 @@ 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
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
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php71/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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
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/
Expand All @@ -12,5 +12,9 @@ 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
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
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php72/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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
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/
Expand All @@ -12,5 +12,9 @@ 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
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
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php73/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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
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/
Expand All @@ -12,5 +12,9 @@ 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
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
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions containers/default/php74/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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
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
Expand All @@ -12,5 +12,9 @@ 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
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
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions containers/default/rabbitmq/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM rabbitmq:alpine

RUN rabbitmq-plugins enable --offline rabbitmq_management

EXPOSE 4369 5671 5672 15671 15672 25672
Loading

0 comments on commit 9d24d63

Please sign in to comment.