<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[8810] sites/trunk/wordcamp.org: WordCamp: Move docker config files to .docker/ for decluttering root.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8810">8810</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8810","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>vedjain</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-05-20 11:51:29 +0000 (Mon, 20 May 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp: Move docker config files to .docker/ for decluttering root.
This creates a `.docker` directory where all the config and provisioning files for docker environment can live therefore not cluttering the root folder.</pre>
<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordcamp.org/.docker/</li>
<li><a href="#sitestrunkwordcamporgdockerDockerfile">sites/trunk/wordcamp.org/.docker/Dockerfile</a></li>
<li><a href="#sitestrunkwordcamporgdockernginxconf">sites/trunk/wordcamp.org/.docker/nginx.conf</a></li>
<li><a href="#sitestrunkwordcamporgdockerphpfpmconf">sites/trunk/wordcamp.org/.docker/php-fpm.conf</a></li>
<li><a href="#sitestrunkwordcamporgdockerwordcampsslconf">sites/trunk/wordcamp.org/.docker/wordcamp.ssl.conf</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgDockerfile">sites/trunk/wordcamp.org/Dockerfile</a></li>
<li><a href="#sitestrunkwordcamporgnginxconf">sites/trunk/wordcamp.org/nginx.conf</a></li>
<li><a href="#sitestrunkwordcamporgphpfpmconf">sites/trunk/wordcamp.org/php-fpm.conf</a></li>
<li><a href="#sitestrunkwordcamporgwordcampsslconf">sites/trunk/wordcamp.org/wordcamp.ssl.conf</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgdockerDockerfilefromrev8809sitestrunkwordcamporgDockerfile"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/.docker/Dockerfile (from rev 8809, sites/trunk/wordcamp.org/Dockerfile)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/.docker/Dockerfile (rev 0)
+++ sites/trunk/wordcamp.org/.docker/Dockerfile 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,45 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+FROM wordpress:5.0.3-fpm
+
+# Move WordPress files to Working Directory
+RUN mv /usr/src/wordpress /usr/src/public_html
+WORKDIR /usr/src/public_html
+
+# Install and configure nginx
+RUN apt-get update
+RUN apt-get install nginx -y
+COPY nginx.conf /etc/nginx/sites-enabled/wordcamp.conf
+COPY php-fpm.conf /usr/local/etc/php-fpm.d/zz-www.conf
+
+# Install and configure SSL
+COPY wordcamp.ssl.conf /var/wordcamp.ssl.conf
+RUN cd ~ && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout wordcamp.key -out wordcamp.crt -config /var/wordcamp.ssl.conf
+RUN cp ~/wordcamp.crt /etc/ssl/certs/wordcamp.crt
+RUN cp ~/wordcamp.key /etc/ssl/private/wordcamp.key
+
+# Install wkhtmltopdf for camptix invoices. See https://stackoverflow.com/a/38336153/1845153
+RUN curl -L https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz > wkhtmltox.tar.xz
+RUN tar xvf wkhtmltox.tar.xz
+RUN mv wkhtmltox/bin/wkhtmlto* /usr/bin/
+
+# Install cli
+RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+RUN chmod +x wp-cli.phar
+RUN mv wp-cli.phar /usr/local/bin/wp
+RUN apt-get install less -y
+
+# Install Mail catcher
+RUN apt-get install build-essential libsqlite3-dev ruby-dev -y
+RUN gem install mailcatcher --no-ri --no-rdoc
+RUN apt-get install ssmtp -y
+RUN sed -i -e "s|;sendmail_path =|sendmail_path = /usr/sbin/ssmtp -t |" /usr/local/etc/php/php.ini-development
+RUN sed -i -e "s/smtp_port = 25/smtp_port = 1025/" /usr/local/etc/php/php.ini-development
+RUN chown root:mail /etc/ssmtp/ssmtp.conf
+RUN sed -i -e "s/#FromLineOverride=YES/FromLineOverride=YES/" /etc/ssmtp/ssmtp.conf
+RUN sed -i -e "s/mailhub=mail/mailhub=127.0.0.1:1025/" /etc/ssmtp/ssmtp.conf
+RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
+
+# Utils
+RUN apt-get install vim -y
+
+CMD tail -f /dev/null
+
</ins></span></pre></div>
<a id="sitestrunkwordcamporgdockernginxconffromrev8809sitestrunkwordcamporgnginxconf"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/.docker/nginx.conf (from rev 8809, sites/trunk/wordcamp.org/nginx.conf)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/.docker/nginx.conf (rev 0)
+++ sites/trunk/wordcamp.org/.docker/nginx.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,51 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Upstream to abstract backend connection(s) for php
+upstream php {
+ server unix:/tmp/php-cgi.socket;
+ server 127.0.0.1:9000;
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name wordcamp.test;
+ return 301 https://wordcamp.test$request_uri;
+}
+
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ server_name wordcamp.test;
+ ssl_certificate /etc/ssl/certs/wordcamp.crt;
+ ssl_certificate_key /etc/ssl/private/wordcamp.key;
+ ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
+
+ root /usr/src/public_html;
+ index index.php;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.php?$args;
+ }
+
+ location ~ \.php$ {
+ include fastcgi.conf;
+ fastcgi_intercept_errors on;
+ fastcgi_pass php;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
+ expires max;
+ log_not_found off;
+ }
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgdockerphpfpmconffromrev8809sitestrunkwordcamporgphpfpmconf"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/.docker/php-fpm.conf (from rev 8809, sites/trunk/wordcamp.org/php-fpm.conf)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/.docker/php-fpm.conf (rev 0)
+++ sites/trunk/wordcamp.org/.docker/php-fpm.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,6 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+[global]
+
+[www]
+php_flag[display_errors] = on
+php_admin_value[error_log] = /var/log/fpm-php.www.log
+php_admin_flag[log_errors] = on
</ins></span></pre></div>
<a id="sitestrunkwordcamporgdockerwordcampsslconffromrev8809sitestrunkwordcamporgwordcampsslconf"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/.docker/wordcamp.ssl.conf (from rev 8809, sites/trunk/wordcamp.org/wordcamp.ssl.conf)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/.docker/wordcamp.ssl.conf (rev 0)
+++ sites/trunk/wordcamp.org/.docker/wordcamp.ssl.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,28 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+[ req ]
+default_bits = 2048
+prompt = no
+default_md = sha256
+req_extensions = req_ext
+distinguished_name = dn
+default_keyfile = wordcamp.key
+
+[ dn ]
+C = IN
+ST = STATE
+L = Location
+O = WordCamp
+OU = WordCampDev
+CN = wordcamp
+
+[ req_ext ]
+subjectAltName = @alt_names
+
+[ alt_names ]
+DNS.1 = wordcamp.docker
+
+[ v3_ext ]
+authorityKeyIdentifier=keyid,issuer:always
+basicConstraints=CA:FALSE
+keyUsage=keyEncipherment,dataEncipherment
+extendedKeyUsage=serverAuth,clientAuth
+subjectAltName=@alt_names%
</ins></span></pre></div>
<a id="sitestrunkwordcamporgDockerfile"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/Dockerfile</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/Dockerfile 2019-05-20 11:51:19 UTC (rev 8809)
+++ sites/trunk/wordcamp.org/Dockerfile 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,48 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-FROM wordpress:5.0.3-fpm
-
-RUN mv /usr/src/wordpress /usr/src/public_html
-WORKDIR /usr/src/public_html
-
-RUN apt-get update
-RUN apt-get install nginx -y
-
-COPY nginx.conf /etc/nginx/sites-enabled/wordcamp.conf
-COPY wordcamp.ssl.conf /var/wordcamp.ssl.conf
-
-RUN cd ~ && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout wordcamp.key -out wordcamp.crt -config /var/wordcamp.ssl.conf
-RUN cp ~/wordcamp.crt /etc/ssl/certs/wordcamp.crt
-RUN cp ~/wordcamp.key /etc/ssl/private/wordcamp.key
-
-# Install wkhtmltopdf for camptix invoices. See https://stackoverflow.com/a/38336153/1845153
-RUN curl -L https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz > wkhtmltox.tar.xz
-RUN tar xvf wkhtmltox.tar.xz
-RUN mv wkhtmltox/bin/wkhtmlto* /usr/bin/
-
-# Install cli
-RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
-RUN chmod +x wp-cli.phar
-RUN mv wp-cli.phar /usr/local/bin/wp
-
-# Mail catcher.
-RUN apt-get install build-essential libsqlite3-dev ruby-dev -y
-RUN gem install mailcatcher --no-ri --no-rdoc
-RUN apt-get install ssmtp -y
-RUN sed -i -e "s|;sendmail_path =|sendmail_path = /usr/sbin/ssmtp -t |" /usr/local/etc/php/php.ini-development
-RUN sed -i -e "s/smtp_port = 25/smtp_port = 1025/" /usr/local/etc/php/php.ini-development
-RUN chown root:mail /etc/ssmtp/ssmtp.conf
-RUN sed -i -e "s/#FromLineOverride=YES/FromLineOverride=YES/" /etc/ssmtp/ssmtp.conf
-RUN sed -i -e "s/mailhub=mail/mailhub=127.0.0.1:1025/" /etc/ssmtp/ssmtp.conf
-RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
-
-# utils
-RUN apt-get install vim -y
-
-COPY php-fpm.conf /usr/local/etc/php-fpm.d/zz-www.conf
-
-# Setup Gutenberg blocks
-RUN apt-get install -y gnupg2 && curl -sL https://deb.nodesource.com/setup_11.x | bash -
-RUN apt-get install -y nodejs
-RUN npm --prefix ./wp-content/mu-plugins/blocks install ./wp-content/mu-plugins/blocks
-
-CMD tail -f /dev/null
-
</del></span></pre></div>
<a id="sitestrunkwordcamporgnginxconf"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/nginx.conf</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/nginx.conf 2019-05-20 11:51:19 UTC (rev 8809)
+++ sites/trunk/wordcamp.org/nginx.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,51 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-# Upstream to abstract backend connection(s) for php
-upstream php {
- server unix:/tmp/php-cgi.socket;
- server 127.0.0.1:9000;
-}
-
-server {
- listen 80;
- listen [::]:80;
- server_name wordcamp.test;
- return 301 https://wordcamp.test$request_uri;
-}
-
-server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
-
- server_name wordcamp.test;
- ssl_certificate /etc/ssl/certs/wordcamp.crt;
- ssl_certificate_key /etc/ssl/private/wordcamp.key;
- ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
-
- root /usr/src/public_html;
- index index.php;
-
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
-
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
-
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
-
- location ~ \.php$ {
- include fastcgi.conf;
- fastcgi_intercept_errors on;
- fastcgi_pass php;
- }
-
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- }
-}
</del></span></pre></div>
<a id="sitestrunkwordcamporgphpfpmconf"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/php-fpm.conf</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/php-fpm.conf 2019-05-20 11:51:19 UTC (rev 8809)
+++ sites/trunk/wordcamp.org/php-fpm.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-[global]
-
-[www]
-php_flag[display_errors] = on
-php_admin_value[error_log] = /var/log/fpm-php.www.log
-php_admin_flag[log_errors] = on
</del></span></pre></div>
<a id="sitestrunkwordcamporgwordcampsslconf"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/wordcamp.ssl.conf</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/wordcamp.ssl.conf 2019-05-20 11:51:19 UTC (rev 8809)
+++ sites/trunk/wordcamp.org/wordcamp.ssl.conf 2019-05-20 11:51:29 UTC (rev 8810)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,28 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-[ req ]
-default_bits = 2048
-prompt = no
-default_md = sha256
-req_extensions = req_ext
-distinguished_name = dn
-default_keyfile = wordcamp.key
-
-[ dn ]
-C = IN
-ST = STATE
-L = Location
-O = WordCamp
-OU = WordCampDev
-CN = wordcamp
-
-[ req_ext ]
-subjectAltName = @alt_names
-
-[ alt_names ]
-DNS.1 = wordcamp.docker
-
-[ v3_ext ]
-authorityKeyIdentifier=keyid,issuer:always
-basicConstraints=CA:FALSE
-keyUsage=keyEncipherment,dataEncipherment
-extendedKeyUsage=serverAuth,clientAuth
-subjectAltName=@alt_names%
</del></span></pre>
</div>
</div>
</body>
</html>