Merge branch 'master' into master

This commit is contained in:
Shao Yu-Lung (Allen) 2018-05-28 10:46:18 +08:00 committed by GitHub
commit 185ba60a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 99 additions and 17 deletions

View File

@ -754,6 +754,21 @@ docker-compose up -d adminer
<br>
<a name="Use-Portainer"></a>
## Use Portainer
1 - Run the Portainer Container (`portainer`) with the `docker-compose up` command. Example:
```bash
docker-compose up -d portainer
```
2 - Open your browser and visit the localhost on port **9010**: `http://localhost:9010`
<br>
<a name="Use-pgAdmin"></a>
@ -828,7 +843,7 @@ docker-compose up -d elasticsearch
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
> The default username is `user` and the default password is `changeme`.
> The default username is `elastic` and the default password is `changeme`.
### Install ElasticSearch Plugin
@ -1058,6 +1073,8 @@ You can add your cron jobs to `workspace/crontab/root` after the `php artisan` l
Make sure you [change the timezone](#Change-the-timezone) if you don't want to use the default (UTC).
If you are on Windows, verify that the line endings for this file are LF only, otherwise the cron jobs will silently fail.

View File

@ -7,7 +7,7 @@ weight: 2
## Requirements
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
- [Docker](https://www.docker.com/products/docker/) `>= 17.12`

View File

@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
- **Queueing Management:**
Beanstalkd Console - RabbitMQ Console
- **Random Tools:**
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Laravel Echo...
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Portainer - Laravel Echo...
Laradock introduces the **Workspace** Image, as a development environment.
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.

View File

@ -48,6 +48,7 @@ services:
context: ./workspace
args:
- PHP_VERSION=${PHP_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
@ -143,6 +144,8 @@ services:
- "dockerhost:${DOCKER_HOST_IP}"
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
depends_on:
- workspace
networks:
- backend
@ -694,3 +697,14 @@ services:
depends_on:
- workspace
tty: true
### Portainer ################################################
portainer:
build:
context: ./portainer
volumes:
- ${DATA_PATH_HOST}/portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9010:9000

View File

@ -6,7 +6,7 @@ syncs:
applications-docker-sync: # name of the intermediary sync volume
compose-dev-file-path: 'docker-compose.sync.yml' # docker-compose override file
src: '${APPLICATION}' # host source directory
src: '${APP_CODE_PATH_HOST}' # host source directory
sync_userid: 1000 # giving permissions to www-data user (as defined in nginx and php-fpm Dockerfiles)
sync_strategy: '${DOCKER_SYNC_STRATEGY}' # for osx use 'native_osx', for windows use 'unison'

View File

@ -31,7 +31,7 @@ COMPOSE_PATH_SEPARATOR=:
### PHP Version ###########################################
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6 - 5.5
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.2
### PHP Interpreter #######################################
@ -79,6 +79,7 @@ WORKSPACE_INSTALL_YARN=true
WORKSPACE_YARN_VERSION=latest
WORKSPACE_INSTALL_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_LDAP=false
WORKSPACE_INSTALL_SOAP=false
@ -133,11 +134,11 @@ PHP_FPM_INSTALL_GMP=false
PHP_FPM_INSTALL_EXIF=false
PHP_FPM_INSTALL_AEROSPIKE=false
PHP_FPM_INSTALL_PGSQL=false
PHP_FPM_INSTALL_POSTGRES=false
PHP_FPM_INSTALL_GHOSTSCRIPT=false
PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_SWOOLE=false
PHP_FPM_INSTALL_PG_CLIENT=false
PHP_FPM_INSTALL_PCNTL=false
### PHP_WORKER ############################################

View File

@ -18,6 +18,10 @@ FROM laradock/php-fpm:2.2-${PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# always run apt update when start and after add new source list, then clean up at end.
RUN apt-get update -yqq && \
pecl channel-update pecl.php.net
#
#--------------------------------------------------------------------------
# Mandatory Software's Installation
@ -48,7 +52,7 @@ ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension
apt-get update -yqq && \
rm /etc/apt/preferences.d/no-debian-php && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
@ -85,9 +89,13 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
docker-php-ext-enable xdebug \
# Install the xdebug extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
else \
pecl install xdebug; \
fi && \
docker-php-ext-enable xdebug \
;fi
# Copy xdebug configuration for remote debugging
@ -128,8 +136,12 @@ ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install swoole-2.0.11; \
else \
pecl install swoole; \
fi && \
docker-php-ext-enable swoole \
;fi
###########################################################################
@ -168,6 +180,16 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
docker-php-ext-install zip \
;fi
###########################################################################
# pcntl
###########################################################################
ARG INSTALL_PCNTL=false
RUN if [ ${INSTALL_PCNTL} = true]; then \
# Installs pcntl, helpful for running Horizon
docker-php-ext-install pcntl \
;fi
###########################################################################
# bcmath:
###########################################################################
@ -187,7 +209,10 @@ ARG INSTALL_GMP=false
RUN if [ ${INSTALL_GMP} = true ]; then \
# Install the GMP extension
apt-get install -y libgmp-dev && \
apt-get install -y libgmp-dev && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
;fi && \
docker-php-ext-install gmp \
;fi
@ -291,7 +316,6 @@ ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
# Install intl and requirements
apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl \

View File

@ -22,7 +22,7 @@ RUN apk --update add wget \
libgsasl-dev \
supervisor
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
# Install PostgreSQL drivers:

3
portainer/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM portainer/portainer
LABEL maintainer="luciano@lucianojr.com.br"

View File

@ -31,7 +31,10 @@ ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
# always run apt update when start and after add new source list, then clean up at end.
RUN apt-get update -yqq && \
pecl channel-update pecl.php.net && \
groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
usermod -p "*" laradock
@ -182,6 +185,19 @@ RUN if [ ${INSTALL_IMAP} = true ]; then \
apt-get install -y php${PHP_VERSION}-imap \
;fi
###########################################################################
# Subversion:
###########################################################################
USER root
ARG INSTALL_SUBVERSION=false
RUN if [ ${INSTALL_SUBVERSION} = true ]; then \
apt-get install -y subversion \
;fi
###########################################################################
# xDebug:
###########################################################################
@ -290,7 +306,11 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl -q install swoole && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl -q install swoole-2.0.11; \
else \
pecl -q install swoole; \
fi && \
echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
;fi
@ -309,7 +329,9 @@ ARG DRUSH_VERSION
ENV DRUSH_VERSION ${DRUSH_VERSION}
RUN if [ ${INSTALL_DRUSH} = true ]; then \
apt-get update -yqq && \
apt-get -y install mysql-client && \
# Install Drush with the phar file.
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar | bash && \
chmod +x /usr/local/bin/drush && \
drush core-status \
@ -324,6 +346,7 @@ USER root
ARG INSTALL_DRUPAL_CONSOLE=false
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
apt-get update -yqq && \
apt-get -y install mysql-client && \
curl https://drupalconsole.com/installer -L -o drupal.phar && \
mv drupal.phar /usr/local/bin/drupal && \