Page MenuHomeDevCentral

D2224.id5596.diff
No OneTemporary

D2224.id5596.diff

diff --git a/roles/paas-docker/nginx/config.sls b/roles/paas-docker/nginx/config.sls
--- a/roles/paas-docker/nginx/config.sls
+++ b/roles/paas-docker/nginx/config.sls
@@ -10,6 +10,16 @@
{% set containers = salt['pillar.get']('docker_containers:' + grains['id'], {}) %}
# -------------------------------------------------------------
+# Base folder
+#
+# :: general configuration
+# -------------------------------------------------------------
+
+{{ dirs.etc }}/nginx/nginx.conf:
+ file.managed:
+ - source: salt://roles/paas-docker/nginx/files/nginx.conf
+
+# -------------------------------------------------------------
# includes folder
#
# :: general configuration
diff --git a/roles/paas-docker/nginx/files/nginx.conf b/roles/paas-docker/nginx/files/nginx.conf
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/nginx/files/nginx.conf
@@ -0,0 +1,54 @@
+# -------------------------------------------------------------
+# Configuration for Docker PaaS front-end nginx
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Author: Sébastien Santoro aka Dereckson
+# Created: 2020-02-18
+# Source file: roles/paas-docker/nginx/files/nginx.conf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+user nginx;
+worker_processes auto;
+error_log /var/log/nginx/error.log;
+pid /run/nginx.pid;
+
+include /usr/share/nginx/modules/*.conf;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ access_log /var/log/nginx/access.log main;
+
+ # Optimizing how packets are sent
+ # Reference: https://thoughts.t37.net/nginx-optimization-understanding-sendfile-tcp-nodelay-and-tcp-nopush-c55cdd276765
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+
+ keepalive_timeout 65;
+ types_hash_max_size 2048;
+ client_max_body_size 64M;
+ server_names_hash_bucket_size 128;
+
+ include mime.types;
+ default_type application/octet-stream;
+
+ map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+ }
+
+ # Services hosted in containers
+ include /etc/nginx/vhosts/*/*.conf;
+}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 03:33 (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261221
Default Alt Text
D2224.id5596.diff (2 KB)

Event Timeline