1
0
mirror of https://github.com/trambarhq/relaks-wordpress-example.git synced 2025-09-03 13:12:38 +02:00

Added Docker and Nginx configs.

This commit is contained in:
Chung Leong
2018-12-21 22:53:16 +01:00
parent af9c572a9c
commit fa7ad2a24d
4 changed files with 326 additions and 0 deletions

44
server/nginx/default.conf Normal file
View File

@@ -0,0 +1,44 @@
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
gzip_min_length 256;
proxy_cache_path /var/cache/nginx/data keys_zone=data:10m max_size=1g;
proxy_temp_path /var/cache/nginx/tmp;
server {
listen 80;
server_name _;
location ~ ^/wp-json/wp/v2/(categories) {
proxy_pass http://wordpress;
proxy_set_header Host $http_host;
include /etc/nginx/conf.d/caching.conf;
}
location ~ ^/wp-.* {
proxy_pass http://wordpress;
proxy_set_header Host $http_host;
}
location / {
proxy_pass http://node;
proxy_set_header Host $http_host;
include /etc/nginx/conf.d/caching.conf;
}
}
upstream node {
server node:80;
}
upstream wordpress {
server wordpress:80;
}