Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move nginx config to mustache #14

Merged
merged 9 commits into from
Jun 8, 2018
Merged

Conversation

kirtangajjar
Copy link
Contributor

No description provided.

deny all;
}
}
# Yoast sitemap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole Yoast section needs to be removed.

fastcgi_pass php:9000;

}
# EasyEngine (ee) utilities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove section # EasyEngine (ee) utilities. Leave the last location ~* .(css|js)$ block.

@@ -0,0 +1,57 @@
# Redis NGINX CONFIGURATION
# DO NOT MODIFY, ALL CHANGES LOST AFTER UPDATE EasyEngine (ee)
set $skip_cache 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename variable $skip_cache to $skip

@mbtamuli mbtamuli changed the title Move nginx config to mustache WIP: Move nginx config to mustache Jun 7, 2018
add_header "Access-Control-Allow-Origin" "*";
access_log off;
log_not_found off;
expires max;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbtamuli this location block is not recommended on dev sites. Static file caching should be only used in production.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll configure this based in the next release which will have [--dev|--prod] flags or something similar, to specify if it is a site in development or production.

set_unescape_uri $key $arg_key ;
redis2_query set $key $echo_request_body;
redis2_query expire $key 14400;
redis2_pass ee4_redis:6379;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we stop using the word ee4? There will be only one ee after this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Noted.

post_max_size = 100M

[mail function]
sendmail_path = /usr/sbin/sendmail -S mail:1025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbtamuli does this work in docker?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is for Docker only. These PRs are not related to non-docker setup.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So did we test within docker if there is a sendmail program at /usr/bin/sendmail?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendmail_path = /usr/sbin/sendmail -S mail:1025

https://github.com/EasyEngine/dockerfiles/blob/master/php/Dockerfile#L15
I think this package ssmtp is installing /usr/sbin/sendmail because the above line is working. It is sending mail which is recieved by MailHog.

Postfix mail is being tracked on in a different issue - EasyEngine/easyengine#1028

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine. Looks good. 👍

@rahul286
Copy link
Member

rahul286 commented Jun 7, 2018

@mbtamuli there will be only one template for WordPress server block.

@rahul286 rahul286 closed this Jun 7, 2018
@rahul286 rahul286 reopened this Jun 7, 2018
@kirtangajjar kirtangajjar changed the title WIP: Move nginx config to mustache Move nginx config to mustache Jun 8, 2018
@kirtangajjar
Copy link
Contributor Author

Related to this PR - EasyEngine/easyengine#1040

location = /robots.txt {
# Some WordPress plugin gererate robots.txt file
# Refer #340 issue
return 200 'User-agent: *\nDisallow: /';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirtangajjar This line will deindex site from the search engines! 😨
Nginx won't use robotos.txt files on disk.
Please remove this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbtamuli this need to be changed

include fastcgi_params;
fastcgi_pass php:9000;
}
location ~* \.(css|js)$ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirtangajjar remove this location block at all. A 5s cache is no useful.

Is there way we add --env check? In dev env this block should not exist. In production, this can exist with longer expiry.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev env will be handled in beta2. Please assume all config is for prod. We'll add flag as well as separate config for dev in next release. @rahul286

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for production, make 5s atleadt 1d.

post_max_size = 100M

[mail function]
sendmail_path = /usr/sbin/sendmail -S mail:1025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So did we test within docker if there is a sendmail program at /usr/bin/sendmail?

@mbtamuli mbtamuli merged commit 0b4c3d4 into EasyEngine:master Jun 8, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants