Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3771710
D2224.id5594.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D2224.id5594.diff
View Options
diff --git a/roles/paas-docker/docker/files/nginx.conf b/roles/paas-docker/docker/files/nginx.conf
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/docker/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;
+}
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
@@ -9,6 +9,16 @@
{% from "map.jinja" import dirs with context %}
{% 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
#
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 01:09 (19 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261437
Default Alt Text
D2224.id5594.diff (2 KB)
Attached To
Mode
D2224: Provide nginx base configuration
Attached
Detach File
Event Timeline
Log In to Comment