Skip to content

Commit

Permalink
Merge pull request #33 from docksal/develop
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
lmakarov authored Apr 5, 2018
2 parents e81b697 + eb3be00 commit ad89337
Show file tree
Hide file tree
Showing 36 changed files with 698 additions and 245 deletions.
96 changes: 59 additions & 37 deletions 5.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,23 @@ ENV LC_ALL C.UTF-8
# Enable additional repos
RUN set -xe; \
sed -i 's/main/main contrib non-free/' /etc/apt/sources.list; \
# Include backports
# backports repo
echo "deb http://ftp.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/backports.list; \
# Include blackfire.io repo
# blackfire.io repo
curl -sSL https://packagecloud.io/gpg.key | apt-key add -; \
echo "deb https://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list; \
# Include git-lfs repo
# git-lfs repo
curl -sSL https://packagecloud.io/github/git-lfs/gpgkey | apt-key add -; \
echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' > /etc/apt/sources.list.d/github_git-lfs.list; \
echo 'deb-src https://packagecloud.io/github/git-lfs/debian/ jessie main' >> /etc/apt/sources.list.d/github_git-lfs.list; \
# Including yarn repo
echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' | tee /etc/apt/sources.list.d/github_git-lfs.list; \
echo 'deb-src https://packagecloud.io/github/git-lfs/debian/ jessie main' | tee -a /etc/apt/sources.list.d/github_git-lfs.list; \
# yarn repo
curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# Additional packages
RUN set -xe; \
apt-get update >/dev/null; apt-get -y --force-yes --no-install-recommends install >/dev/null \
cron \
dnsutils \
git-lfs \
ghostscript \
Expand All @@ -68,6 +69,7 @@ RUN set -xe; \
nano \
openssh-client \
openssh-server \
postgresql-client \
procps \
pv \
rsync \
Expand Down Expand Up @@ -111,25 +113,30 @@ ENV NOTVISIBLE "in users profile"
# Install PHP extentions
RUN set -xe; \
buildDeps=" \
freetds-dev \
g++ \
libc-client2007e-dev \
libfreetype6-dev \
libgpgme11-dev \
libicu-dev \
libjpeg62-turbo-dev \
libkrb5-dev \
libldap2-dev \
libmagickcore-dev \
libmagickwand-dev \
libmcrypt-dev \
libmemcached-dev \
libmhash-dev \
libpng12-dev \
libpq-dev \
libssh2-1-dev \
libxslt1-dev \
zlib1g-dev \
"; \
apt-get update >/dev/null; apt-get -y --force-yes --no-install-recommends install >/dev/null \
$buildDeps \
blackfire-php \
libc-client2007e \
libfreetype6 \
libgpgme11 \
libicu52 \
Expand All @@ -140,37 +147,41 @@ RUN set -xe; \
libmcrypt4 \
libmhash2 \
libpng12-0 \
libpq5 \
libssh2-1 \
libsybdb5 \
libxslt1.1 \
zlib1g \
;\
docker-php-ext-configure >/dev/null hash --with-mhash; \
docker-php-ext-configure >/dev/null gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/; \
docker-php-ext-configure >/dev/null imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure >/dev/null ldap --with-libdir=lib/x86_64-linux-gnu/; \
# mssql can be install in PHP 5.6 only. pdo_dblib is available in PHP 7.0+ as well.
docker-php-ext-configure >/dev/null mssql --with-libdir=/lib/x86_64-linux-gnu/; \
docker-php-ext-configure >/dev/null pdo_dblib --with-libdir=/lib/x86_64-linux-gnu/; \
docker-php-ext-configure >/dev/null pgsql --with-pgsql=/usr/local/pgsql/; \
\
docker-php-ext-install >/dev/null -j$(nproc) \
bcmath \
bz2 \
calendar\
dba \
exif \
gd \
gettext \
imap \
intl \
ldap \
mcrypt \
mssql \
mysqli \
opcache \
pcntl \
mysql \
mysqli \
pdo_dblib \
pdo_mysql \
shmop \
pdo_pgsql \
pgsql \
soap \
sockets \
sysvmsg \
sysvsem \
sysvshm \
wddx \
xsl \
zip \
;\
Expand Down Expand Up @@ -202,25 +213,31 @@ RUN set -xe; \
# Copy mhsendmail binary from stage 1
COPY --from=mhbuild /go/bin/mhsendmail /usr/local/bin/mhsendmail

ENV COMPOSER_VERSION=1.5.2 \
DRUSH_VERSION=8.1.13 \
DRUPAL_CONSOLE_VERSION=1.0.2 \
WPCLI_VERSION=1.3.0 \
MG_CODEGEN_VERSION=1.6.4 \
BLACKFIRE_VERSION=1.14.1
ENV COMPOSER_VERSION=1.6.3 \
DRUSH_VERSION=8.1.16 \
DRUSH_LAUNCHER_VERSION=0.6.0 \
DRUPAL_CONSOLE_VERSION=1.7.0 \
WPCLI_VERSION=1.5.0 \
MG_CODEGEN_VERSION=1.10 \
BLACKFIRE_VERSION=1.15.0 \
GOMPLATE_VERSION=2.4.0
RUN set -xe; \
# Composer
curl -sSL "https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar" -o /usr/local/bin/composer; \
# Drush 8 (default)
curl -sSL "https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar" -o /usr/local/bin/drush; \
curl -sSL "https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar" -o /usr/local/bin/drush8; \
# Drush Launcher
curl -sSL "https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VERSION}/drush.phar" -o /usr/local/bin/drush; \
# Drupal Console
curl -sSL "https://github.com/hechoendrupal/drupal-console-launcher/releases/download/${DRUPAL_CONSOLE_VERSION}/drupal.phar" -o /usr/local/bin/drupal; \
# Install wp-cli
# Wordpress CLI
curl -sSL "https://github.com/wp-cli/wp-cli/releases/download/v${WPCLI_VERSION}/wp-cli-${WPCLI_VERSION}.phar" -o /usr/local/bin/wp; \
# Install magento code generator
# Magento2 Code Generator
curl -sSL "https://github.com/staempfli/magento2-code-generator/releases/download/${MG_CODEGEN_VERSION}/mg2-codegen.phar" -o /usr/local/bin/mg2-codegen; \
# Install blackfire cli
# Blackfire CLI
curl -sSL https://packages.blackfire.io/binaries/blackfire-agent/${BLACKFIRE_VERSION}/blackfire-cli-linux_static_amd64 -o /usr/local/bin/blackfire; \
# gomplate
curl -sSL https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-amd64-slim -o /usr/local/bin/gomplate; \
# Make all binaries executable in one shot
chmod +x /usr/local/bin/*

Expand All @@ -243,8 +260,8 @@ USER docker
ENV HOME /home/docker

# Install nvm and a default node version
ENV NVM_VERSION=0.33.4 \
NODE_VERSION=6.11.3 \
ENV NVM_VERSION=0.33.8 \
NODE_VERSION=8.11.0 \
NVM_DIR=$HOME/.nvm
# Don't use -x here - node/nvm stuff prints just too much stuff
RUN set -e; \
Expand All @@ -259,16 +276,14 @@ RUN set -e; \
# Fix npm complaining about permissions and not being able to update
sudo rm -rf $HOME/.config

ENV PATH $PATH:$HOME/.composer/vendor/bin
# Install Composer based dependencies
ENV PATH=$PATH:$HOME/.composer/vendor/bin \
DRUSH_LAUNCHER_FALLBACK=/usr/local/bin/drush8
ENV PATH=$PATH:$HOME/.terminus/vendor/bin \
TERMINUS_VERSION=1.8.0
RUN set -xe; \
# Add composer bin directory to PATH
echo "\n"'PATH="$PATH:$HOME/.composer/vendor/bin"' >> $HOME/.profile; \
# Legacy Drush versions (6 and 7)
#mkdir $HOME/drush6 && cd $HOME/drush6 && composer require drush/drush:6.*;\
#mkdir $HOME/drush7 && cd $HOME/drush7 && composer require drush/drush:7.*;\
#echo "alias drush6='$HOME/drush6/vendor/bin/drush'" >> $HOME/.bash_aliases; \
#echo "alias drush7='$HOME/drush7/vendor/bin/drush'" >> $HOME/.bash_aliases; \
echo "alias drush8='/usr/local/bin/drush'" >> $HOME/.bash_aliases; \
# Drush modules
drush dl registry_rebuild --default-major=7 --destination=$HOME/.drush >/dev/null; \
drush cc drush; \
Expand All @@ -277,15 +292,22 @@ RUN set -xe; \
phpcs --config-set installed_paths $HOME/.composer/vendor/drupal/coder/coder_sniffer; \
# Composer parallel install plugin
composer global require hirak/prestissimo >/dev/null; \
# Terminus
# Installed in a dedicated directory to avoid dependency conflicts.
echo "\n"'PATH="$PATH:$HOME/.terminus/vendor/bin"' >> $HOME/.profile; \
mkdir -p $HOME/.terminus; \
# Run in a subshell since we are doing directory switching
(cd $HOME/.terminus && composer require pantheon-systems/terminus:${TERMINUS_VERSION}); \
# Cleanup
composer clear-cache

USER root

# Copy configs and scripts
COPY --chown=docker:docker config/.ssh $HOME/.ssh
COPY --chown=docker:docker config/.drush $HOME/.drush
COPY --chown=docker:docker config/.acquia $HOME/.acquia
COPY --chown=docker:docker config/.docksalrc $HOME/.docksalrc
COPY --chown=docker:docker config/.drush $HOME/.drush
COPY --chown=docker:docker config/.ssh $HOME/.ssh
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY startup.sh /opt/startup.sh
COPY healthcheck.sh /opt/healthcheck.sh
Expand Down
1 change: 1 addition & 0 deletions 5.6/config/.acquia/cloudapi.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"email":"{{ getenv "SECRET_ACAPI_EMAIL" }}","key":"{{ getenv "SECRET_ACAPI_KEY" }}"}
27 changes: 23 additions & 4 deletions 5.6/config/.drush/acapi.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ function acapi_drush_command() {
'arguments' => array(
),
'options' => $options + array(
'reset' => 'Discard any existing stored values from a previous call. Without this option, new values will be merged with existing values.',
'reset' => array(
'description' => 'Discard any existing stored values from a previous call. Without this option, new values will be merged with existing values.'
),
),
);

Expand Down Expand Up @@ -284,11 +286,20 @@ function acapi_drush_command() {
'description' => "List a site's tasks.",
'arguments' => array(
),
'options' => array (
'state' => array (
'options' => array(
'state' => array(
'description' => 'The task state to retrieve. If not specified, retrieve all tasks for the site.',
'example-value' => 'done',
)) + $options,
),
'days' => array(
'description' => 'The number of days worth of tasks to retrieve. If not specified, retrieve, at a maximum, 7 days worth of tasks.',
'example-value' => '5',
),
'limit' => array(
'description' => 'The maximum number of tasks to retrieve. If not specified, retrieve a maximum of 50 tasks. The maximum value allowed is 1000.',
'example-value' => '500'
),
) + $options,
);

$items['ac-task-info'] = array(
Expand Down Expand Up @@ -783,10 +794,18 @@ function drush_acapi_ac_task_list() {
$api_args = acapi_get_site_args();
$format = acapi_get_option('format');
$state = drush_get_option('state', NULL);
$days = drush_get_option('days', NULL);
$limit = drush_get_option('limit', NULL);
$params = array();
if (isset($state)) {
$params['state'] = $state;
}
if (isset($days)) {
$params['days'] = $days;
}
if (isset($limit)) {
$params['limit'] = $limit;
}

list($status, $result) = acapi_call(
'GET',
Expand Down
1 change: 1 addition & 0 deletions 5.6/config/.ssh/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Disable remote host key checking and warnings
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Expand Down
1 change: 1 addition & 0 deletions 5.6/config/.ssh/id_rsa.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ getenv "SECRET_SSH_PRIVATE_KEY" }}
2 changes: 1 addition & 1 deletion 5.6/config/php/zz-php.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; PHP global (CLI and FPM) settings
; To override settings for FPM use docksal-www.conf
[php]
memory_limit = 512M
memory_limit = 1024M
max_execution_time = 600
always_populate_raw_post_data = -1
sendmail_path = /bin/true
Expand Down
12 changes: 5 additions & 7 deletions 5.6/php-modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Core
ctype
curl
date
dba
dom
ereg
exif
Expand All @@ -20,41 +19,40 @@ gnupg
hash
iconv
imagick
imap
intl
json
ldap
libxml
mbstring
mcrypt
memcache
mysql
mssql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
ssh2
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Expand Down
Loading

0 comments on commit ad89337

Please sign in to comment.