Merge ~tcuthbert/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master into ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master

Proposed by Thomas Cuthbert
Status: Merged
Approved by: Barry Price
Approved revision: e987850272c4e53588f58d4400b3508e1e2b3c25
Merged at revision: 8e8af581381fff97e0caa710868dcdbb6ca0b6cd
Proposed branch: ~tcuthbert/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master
Merge into: ~wordpress-charmers/charm-k8s-wordpress/+git/wordpress-k8s-image-builder:master
Diff against target: 30 lines (+7/-0)
2 files modified
Dockerfile (+2/-0)
files/docker-php.conf (+5/-0)
Reviewer Review Type Date Requested Status
Barry Price Approve
Canonical IS Reviewers Pending
Review via email: mp+382913@code.launchpad.net

Commit message

We need to proxy the wp-content URLs to swift via apache mod_proxy_http.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Unable to determine commit message from repository - please click "Set commit message" and enter the commit message manually.

Revision history for this message
Tom Haddon (mthaddon) wrote :

This will need a charm change as well, so leaving this for when barry is able to work on that.

Revision history for this message
Barry Price (barryprice) wrote :

Charm change is done:

https://code.launchpad.net/~barryprice/charm-k8s-wordpress/+git/charm-k8s-wordpress/+merge/383120

So approving this, but will be landing further fixes from my own branch

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 8e8af581381fff97e0caa710868dcdbb6ca0b6cd

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index 2f08cce..e58cfac 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -34,6 +34,8 @@ COPY ./files/docker-php.conf $APACHE_CONFDIR/conf-available/docker-php.conf
6 RUN a2enconf docker-php \
7 && a2dismod mpm_event \
8 && a2enmod mpm_prefork \
9+ && a2enmod proxy \
10+ && a2enmod proxy_http \
11 && a2enmod rewrite
12
13 # Install the main Wordpress code, this will be our only site so /var/www/html is fine
14diff --git a/files/docker-php.conf b/files/docker-php.conf
15index 283d871..f32d064 100644
16--- a/files/docker-php.conf
17+++ b/files/docker-php.conf
18@@ -1,3 +1,5 @@
19+PassEnv SWIFT_URL
20+
21 <FilesMatch \.php$>
22 SetHandler application/x-httpd-php
23 </FilesMatch>
24@@ -15,3 +17,6 @@ DirectoryIndex index.php index.html
25 RewriteCond %{REQUEST_FILENAME} !-d
26 RewriteRule . /index.php [L]
27 </Directory>
28+
29+ProxyPass /wp-content/uploads/ ${SWIFT_URL}
30+ProxyPassReverse /wp-content/uploads/ ${SWIFT_URL}

Subscribers

People subscribed via source and target branches