diff --git a/build/httpd/Dockerfile b/build/httpd/Dockerfile
new file mode 100644
index 000000000..b6ccc2d85
--- /dev/null
+++ b/build/httpd/Dockerfile
@@ -0,0 +1,26 @@
+FROM debian:stretch
+MAINTAINER Christophe Burki, christophe.burki@camptocamp.com
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ apache2 \
+ ca-certificates \
+ libapache2-mod-php7.0 \
+ php7.0 \
+ php7.0-gd \
+ php7.0-curl \
+ php7.0-mysql \
+ php7.0-mbstring \
+ php7.0-xml \
+ && \
+ apt-get -y autoremove && \
+ apt-get clean
+
+COPY server.key /etc/apache2/ssl/
+COPY server.cert /etc/apache2/ssl/
+COPY apache2.conf /etc/apache2/
+COPY docker-entrypoint.sh /
+RUN chmod a+x /docker-entrypoint.sh
+
+EXPOSE 80 443
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
diff --git a/build/httpd/apache2.conf b/build/httpd/apache2.conf
new file mode 100644
index 000000000..27cc0a130
--- /dev/null
+++ b/build/httpd/apache2.conf
@@ -0,0 +1,36 @@
+DefaultRuntimeDir ${APACHE_RUN_DIR}
+PidFile ${APACHE_PID_FILE}
+Timeout 300
+KeepAlive On
+MaxKeepAliveRequests 100
+KeepAliveTimeout 5
+
+User ${APACHE_RUN_USER}
+Group ${APACHE_RUN_GROUP}
+
+HostnameLookups Off
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+LogLevel warn
+
+IncludeOptional mods-enabled/*.load
+IncludeOptional mods-enabled/*.conf
+
+Include ports.conf
+
+AccessFileName .htaccess
+
+ Require all denied
+
+
+ AllowOverride All
+
+
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+
+IncludeOptional conf-enabled/*.conf
+IncludeOptional sites-enabled/*.conf
diff --git a/build/httpd/docker-entrypoint.sh b/build/httpd/docker-entrypoint.sh
new file mode 100644
index 000000000..01bb65b45
--- /dev/null
+++ b/build/httpd/docker-entrypoint.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+cat > /etc/apache2/conf-available/dyn-vhost.conf <
+ SSLEngine on
+ SSLCertificateFile "/etc/apache2/ssl/server.cert"
+ SSLCertificateKeyFile "/etc/apache2/ssl/server.key"
+
+EOF
+
+/bin/mkdir -p /srv/${WP_ENV}/logs
+/bin/chown -R www-data: /srv
+
+/usr/sbin/a2dissite 000-default
+/usr/sbin/a2enmod ssl
+/usr/sbin/a2enmod rewrite
+/usr/sbin/a2enmod vhost_alias
+/usr/sbin/a2enconf dyn-vhost
+
+/usr/sbin/apache2ctl -DFOREGROUND
diff --git a/build/httpd/server.cert b/build/httpd/server.cert
new file mode 100644
index 000000000..2878ec86b
--- /dev/null
+++ b/build/httpd/server.cert
@@ -0,0 +1,34 @@
+-----BEGIN CERTIFICATE-----
+MIIFzzCCA7egAwIBAgIJAIXoojF6L1N7MA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNV
+BAYTAkNIMQ0wCwYDVQQIDARWYXVkMREwDwYDVQQHDAhMYXVzYW5uZTE4MDYGA1UE
+CgwvRWNvbGUgUG9seXRlY2huaXF1ZSBGZWRlcmFsZSBkZSBMYXVzYW5uZSAoRVBG
+TCkxEjAQBgNVBAMMCSouZXBmbC5jaDAgFw0xNzA5MDgxMDUyMTlaGA8yMTE3MDgx
+NTEwNTIxOVowfTELMAkGA1UEBhMCQ0gxDTALBgNVBAgMBFZhdWQxETAPBgNVBAcM
+CExhdXNhbm5lMTgwNgYDVQQKDC9FY29sZSBQb2x5dGVjaG5pcXVlIEZlZGVyYWxl
+IGRlIExhdXNhbm5lIChFUEZMKTESMBAGA1UEAwwJKi5lcGZsLmNoMIICIjANBgkq
+hkiG9w0BAQEFAAOCAg8AMIICCgKCAg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iicTGHGdGMHbF8lg
+dMQyNYq7CA0mcLt2mD4XIfbB3U47q0kFnLlB5+xo7/S1Mxu0ie2MOjCmfaTxZrmT
+YaZhFLcIpx/m5qRR0RckjtrqGPNG57M6DLDpwqAK7TIc0j5DtRWewKsfWEFc/VFt
+iovPzOLbZ3CTWxCLnHi98BdqsBx17RuLK7pA5eNerD9daGmZumdwrABLF/J/oyoa
+/eedHqeIY1ROpvxCn/Oj6ip+IDUwD/QQsgsM8p337cmfMW3U1sWcJgqQpjJy11gS
+iQ8KOcv4USFBTeakWPg55R37a2piu8S2kh2/ydGYSGWDk50hhuFr5jZA7IldfpVT
+C0JcCG1KInBMj+X5MO6lRFkwCEYGygYM1XR7b0vyPOtIX3BYjc+L7Jd0xoV1P4Xo
+GBgcBz6hmP4YPuqZYRqLLTNkSEiqSNG/A+laZp/sxBmqeuW0tjfuHliTtX/3FQgp
+uqmV
+-----END CERTIFICATE-----
diff --git a/build/httpd/server.key b/build/httpd/server.key
new file mode 100644
index 000000000..e3df7a8d3
--- /dev/null
+++ b/build/httpd/server.key
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQC5w5PNZlG3MnOX
+FK1bsreYS8Lc1S4lI3O6FMxX+2k/4L6Qm8UODf6QQrMjAdnaV5rieZ54ejXdyTLq
+xmBSlrB1K6Tjy5WclPcTxVqZqgWbWny9us2GDQjHzYUU+3wuPP7ZrP/eMWLnsRp3
+uks0GNbQVm99uQOrCGh3wP/vCDBdhL0LaNIgQSLcAfia7zqpRgG1LJGSq+E1HOLq
+GKkQSW4cyT9v1/bWx6jHQTfJQZcJZNvyGGHCyxW1ND837jwus1/VhkaNahRgwgmx
+7stVG7ogm+HfG0wDRtr8iE/fZwX+8tWDVIgIVX9ZWamr8RBa5AY4vhZrnCh8ik0T
+Yz0szCwfKUX2tz78Ee4r6V2ssPl+5BRvMyatvdrSqy3pU4DQeAslQvOx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fL5/lOVjLDXmE6N0c746hOBIILvTciofW0Hn6e
+yZecIOH9yQOZmRn03yQ+lyVBC7EGRDsp3zg90zul9SueSfTHvTDJwuiIDhMn3eZo
+FQz04b4q4ir++xQGKM9F6HXyNmyLjxEBCjiUhjUI4WT/iCQHCmDvJueOD9VXoQiB
+t4DFOdCjh3K+VXHNUGA78zkjMScsj4mLX53mDMgh1L5+QxXhVkjZIFmQQinm3j74
+SNInvU0EPC3frKKBUkV0dKAof0E5hciTlW6kr2p2mIYqgOnv0qtv3yqrJJn+3dRC
+CIUCggEABQzGE0ZQo20g2dLPyFB8XxSYAzeLgv6VqvHCJyBmAmAMWbDvZDJsEdZJ
+DjX8BaLVFdzoYonxxcIfW1ldo0HV+VAPu/1Y5uZjuYUoO56MkOmQjEEeD5fe7xL0
+jxmPwEX4Te/nz7m43s8nhlhLCdLv3OK8G8dnOwPw1sABA/sJxpZhboSqw51ZRQTJ
+Mh4bysa7gdIAYWrRYrsQ3PSQfsYaN09BBTCClR9pUdn1n+PE8Zk9JKyskE8ZbSBs
+89jQRvOO28koa/CsqsDT+V12IGz0iFqgkKs9XVuAhSuFEyzy/ZW8f5+zLwqj9p1t
+JdwALRpBinayVyEp2TGwfDLQ2MA9kQ==
+-----END PRIVATE KEY-----
diff --git a/build/mgmt/Dockerfile b/build/mgmt/Dockerfile
new file mode 100644
index 000000000..99a8aa715
--- /dev/null
+++ b/build/mgmt/Dockerfile
@@ -0,0 +1,56 @@
+FROM debian:stretch
+MAINTAINER Christophe Burki, christophe.burki@camptocamp.com
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ bash-completion \
+ curl \
+ git \
+ htop \
+ less \
+ make \
+ mysql-client \
+ openssh-server \
+ tree \
+ php7.0 \
+ php7.0-cli \
+ php7.0-curl \
+ php7.0-mysql \
+ python3 \
+ python3-pip \
+ python3-virtualenv \
+ virtualenv \
+ screen \
+ unzip \
+ vim && \
+ curl -k -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
+ chmod a+x /usr/local/bin/wp && \
+ apt-get clean
+
+RUN mkdir /var/run/sshd && \
+ sed -ri 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config && \
+ sed -ri 's/AcceptEnv LANG LC_\*/AcceptEnv LANG LC_\* WP_ENV/g' /etc/ssh/sshd_config && \
+ sed -ri 's/#UsePrivilegeSeparation sandbox/UsePrivilegeSeparation no/g' /etc/ssh/sshd_config && \
+ sed -ri 's/#?PermitRootLogin\s+.*/PermitRootLogin yes/g' /etc/ssh/sshd_config && \
+ mkdir /tmp/openshift && \
+ cd /tmp/openshift && \
+ curl -L -O https://github.com/openshift/origin/releases/download/v3.6.0/openshift-origin-client-tools-v3.6.0-c4dd4cf-linux-64bit.tar.gz && \
+ tar -xf openshift-origin-client-tools-v3.6.0-c4dd4cf-linux-64bit.tar.gz && \
+ mv */oc /usr/local/bin && \
+ cd / && \
+ rm -rf /tmp/openshift && \
+ mkdir /root/.ssh
+
+COPY ./bash_profile /var/www/.bash_profile
+COPY ./docker-entrypoint.sh /
+
+RUN sed -ir 's#www-data.*:/usr/sbin/nologin#www-data:x:33:33:www-data:/var/www:/bin/bash#' /etc/passwd
+RUN mkdir -p /var/www/.ssh
+RUN chown -R www-data: /var/www
+RUN chmod 700 /var/www/.ssh
+
+RUN su www-data -c "/usr/local/bin/wp package install git@github.com:diggy/polylang-cli.git"
+RUN su www-data -c "/usr/local/bin/wp package install git@github.com:cortneyray/wp-cli-polylang.git"
+
+EXPOSE 22
+ENTRYPOINT ["/docker-entrypoint.sh"]
+CMD ["/usr/sbin/sshd", "-D"]
diff --git a/build/mgmt/bash_profile b/build/mgmt/bash_profile
new file mode 100644
index 000000000..adda45e20
--- /dev/null
+++ b/build/mgmt/bash_profile
@@ -0,0 +1,4 @@
+if [ -f /srv/.bashrc ]; then
+ . /srv/.bashrc
+fi
+
diff --git a/build/mgmt/docker-entrypoint.sh b/build/mgmt/docker-entrypoint.sh
new file mode 100755
index 000000000..ac337b7ce
--- /dev/null
+++ b/build/mgmt/docker-entrypoint.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+chown -R www-data:www-data /var/www/.ssh
+chmod 0700 /var/www/.ssh
+
+exec "$@"
diff --git a/docker-compose.yml b/docker-compose.yml
index 871d6b539..921dfc5c9 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,7 @@ version: '3'
services:
db:
- image: mysql:5.7
+ image: mariadb:5.5
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
@@ -19,7 +19,7 @@ services:
- /sessions
httpd:
- image: camptocamp/os-wp-httpd
+ image: epflidevelop/os-wp-httpd
volumes:
- ./volumes/srv:/srv
links:
@@ -33,7 +33,7 @@ services:
mgmt:
labels:
ch.epfl.jahia2wp.mgmt.env: ${WP_ENV}
- image: camptocamp/os-wp-mgmt
+ image: epflidevelop/os-wp-mgmt
env_file:
- .env
environment:
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 956640cba..f3a4c6e61 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -11,6 +11,7 @@ Table of releases
+- [[0.2.14] - 2017-11-17](#0214---2017-11-17)
- [[0.2.13] - 2017-11-14/15](#0213---2017-11-1415)
- [[0.2.12] - 2017-11-09](#0212---2017-11-09)
- [[0.2.11] - 2017-11-08](#0211---2017-11-08)
@@ -29,10 +30,25 @@ Table of releases
+## [0.2.14] - 2017-11-17
+
+**[PR #77](https://github.com/epfl-idevelop/jahia2wp/pull/77)**
+
+**High level changes:**
+
+1. Tagged version after Sprint_S1711
+1. (#77) Need to reset DB (using 5.5 instead of 5.7) and containers (images location changed)
+
+**Low level changes:**
+
+1. (#77) added Dockerfiles image to build up `httpd` and `mgmt` docker images
+1. (#77) aligned mariaDB version (5.5) with the one used on C2C infra
+
+
## [0.2.13] - 2017-11-14/15
**[PR #70](https://github.com/epfl-idevelop/jahia2wp/pull/70)**
-**[PR #75](https://github.com/epfl-idevelop/jahia2wp/pull/70)**
+**[PR #75](https://github.com/epfl-idevelop/jahia2wp/pull/75)**
**[PR #76](https://github.com/epfl-idevelop/jahia2wp/pull/76)**
**[PR #80](https://github.com/epfl-idevelop/jahia2wp/pull/80)**
**[PR #81](https://github.com/epfl-idevelop/jahia2wp/pull/81)**
diff --git a/src/settings.py b/src/settings.py
index c3bd0435d..20c8c3c5d 100644
--- a/src/settings.py
+++ b/src/settings.py
@@ -3,7 +3,7 @@
from utils import Utils
-VERSION = "0.2.13"
+VERSION = "0.2.14"
# This Docker IP address is used for automatic testing.
# Docker may change it in the future, which will cause some tests to fail.