Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e14546356c | |||
| baf2239c57 | |||
| a1a32bb636 |
@@ -30,3 +30,4 @@
|
||||
.env
|
||||
vendor
|
||||
node_modules
|
||||
docker-compose.override.yml
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# uncoment volumes below to bind specif plugins and themes from other paths into your project
|
||||
# copy this file as 'docker-compose.override.yml' for autoloading with docker-compose.yml
|
||||
#
|
||||
services:
|
||||
|
||||
reverse-proxy:
|
||||
# volumes:
|
||||
# - ../repo/wp-content/themes/my-theme:/var/www/html/wp-content/themes/my-theme
|
||||
# - ../repo/wp-content/plugins/my-plugin:/var/www/html/wp-content/plugins/my-plugin
|
||||
|
||||
app:
|
||||
# volumes:
|
||||
# - ../repo/wp-content/themes/my-theme:/var/www/html/wp-content/themes/my-theme
|
||||
# - ../repo/wp-content/plugins/my-plugin:/var/www/html/wp-content/plugins/my-plugin
|
||||
+2
-5
@@ -11,11 +11,10 @@ services:
|
||||
- app
|
||||
volumes:
|
||||
- ./webroot:/var/www/html
|
||||
- ../repo/wp-content/themes/itforumportal:/var/www/html/wp-content/themes/itforumportal
|
||||
- ../repo/wp-content/plugins/advanced-custom-fields-pro:/var/www/html/wp-content/plugins/advanced-custom-fields-pro
|
||||
environment:
|
||||
WORDPRESS_SITEURL: ${WPSTACK_PROTOCOL}://${WPSTACK_DOMAIN}/${WPSTACK_URLPATH:-}
|
||||
WORDPRESS_SITE_TYPE: ${WPSTACK_MULTISITE:-regular}
|
||||
REMOTE_MEDIA_URL: ${REMOTE_MEDIA_URL:-}
|
||||
labels:
|
||||
caddy: ${WPSTACK_DOMAIN}
|
||||
caddy.reverse_proxy: "reverse-proxy:80"
|
||||
@@ -32,10 +31,8 @@ services:
|
||||
dockerfile: ./docker/wordpress/Dockerfile
|
||||
volumes:
|
||||
- ./webroot:/var/www/html
|
||||
- ../repo/wp-content/themes/itforumportal:/var/www/html/wp-content/themes/itforumportal
|
||||
- ../repo/wp-content/plugins/advanced-custom-fields-pro:/var/www/html/wp-content/plugins/advanced-custom-fields-pro
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_HOST: ${WPSTACK_PROJECT_NAME:-wpstack}-db
|
||||
WORDPRESS_DB_USER: ${DB_USER}
|
||||
WORDPRESS_DB_NAME: ${DB_NAME}
|
||||
WORDPRESS_DB_PASSWORD: ${DB_PASS}
|
||||
|
||||
@@ -28,6 +28,19 @@ server {
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/wp-content/uploads/(.*)$ {
|
||||
try_files $uri @remote_assets;
|
||||
}
|
||||
|
||||
location @remote_assets {
|
||||
set $remote_url "${REMOTE_MEDIA_URL}";
|
||||
if ($remote_url = "") {
|
||||
return 404;
|
||||
}
|
||||
add_header X-Redirect-From "nginx-local" always;
|
||||
return 302 $remote_url$request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
# This is cool because no php is touched for static content.
|
||||
# include the "?$args" part so non-default permalinks doesn't break when using query string
|
||||
|
||||
Reference in New Issue
Block a user