aboutsummaryrefslogtreecommitdiffstats
path: root/docker/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'docker/nginx.conf')
-rw-r--r--docker/nginx.conf59
1 files changed, 59 insertions, 0 deletions
diff --git a/docker/nginx.conf b/docker/nginx.conf
new file mode 100644
index 0000000..ece52cc
--- /dev/null
+++ b/docker/nginx.conf
@@ -0,0 +1,59 @@
+#daemon off; ##Included in CMD
+error_log /dev/stdout info;
+worker_processes 1;
+
+# user nobody nogroup;
+pid /tmp/nginx.pid;
+
+events {
+ worker_connections 1024;
+ accept_mutex off;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ access_log /dev/stdout combined;
+ sendfile on;
+
+ upstream app_server {
+ # For a TCP configuration:
+ server gitrefineryapp:5000 fail_timeout=0;
+ }
+
+ server {
+ listen 80 default;
+ client_max_body_size 16m;
+ server_name _;
+
+ add_header X-Content-Type-Options nosniff;
+
+ keepalive_timeout 20;
+
+ # path for static files
+ root /usr/share/nginx/html;
+
+ location /protected/imagecompare-patches {
+ internal;
+ add_header X-Status $upstream_http_x_status;
+ limit_except GET POST OPTIONS { deny all; }
+ root /opt/www;
+ }
+
+ location / {
+ limit_except GET POST OPTIONS { deny all; }
+ try_files $uri @proxy_to_app;
+ }
+
+ location @proxy_to_app {
+ limit_except GET POST OPTIONS { deny all; }
+
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+
+ proxy_pass http://app_server;
+ }
+
+ }
+}