Commit 8252dd7a authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Move copied static content to a subdir

Static content copied from the app source tree now goes in
/app/static/wp/

This does two things:

- Fixes static error pages being removed on startup
- Allows sandbox mode plugins and themes to survive restarts
parent 9a44c0cf
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ map $http_x_forwarded_proto $forwarded_https {
server {
	listen 80;
	server_name _;
	root /app/static;
	root /app/static/wp;

	# Consider all private IP addresses safe sources for X-Forwarded-For
	set_real_ip_from 10.0.0.0/8;
+3 −2
Original line number Diff line number Diff line
@@ -209,9 +209,10 @@ setup_sandbox()
	wp config set FS_METHOD direct
	wp config set WP_CONTENT_DIR /app/static/wp-content
	wp config set WPMU_PLUGIN_DIR /app/wp-content/mu-plugins
	rm -r static/wp/wp-content
	ln -s ../wp-content static/wp/wp-content
	rsync \
		--archive \
		--delete-delay \
		--exclude=/wp-content/mu-plugins/ \
		wp-content static/
	mkdir -p \
@@ -246,7 +247,7 @@ collect_static()
		--recursive \
		--relative \
		--times \
		. static/
		. static/wp/
}

generate_static()