summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKapil Viren Ahuja <k.v.ahuja@gmail.com>2017-04-03 11:40:56 +0530
committerKapil Viren Ahuja <k.v.ahuja@gmail.com>2017-04-03 11:40:56 +0530
commit690998874689f12545f931cf53a13f96eb7cc64f (patch)
treeeee41956b9faafe8cf9b5d72906b8f7142d1a05c
parent8bdc754c5abbca8b2927de1cb05840faae6336a5 (diff)
downloadvaindock-690998874689f12545f931cf53a13f96eb7cc64f.tar.gz
vaindock-690998874689f12545f931cf53a13f96eb7cc64f.zip
added web sockets proxy
-rw-r--r--docker-compose.yml5
-rw-r--r--nginx/nginx.conf45
-rw-r--r--nginx/sites/default.conf30
-rw-r--r--nginx/sites/sample.conf.example28
4 files changed, 30 insertions, 78 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index d25acef..1ba1ad7 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -38,8 +38,6 @@ services:
- "dockerhost:10.0.75.1"
ports:
- "2222:22"
- links:
- - vaindock_queue
tty: true
### PHP-FPM Container #######################################
@@ -83,6 +81,9 @@ services:
volumes:
- ./logs/nginx/:/var/log/nginx
- ./nginx/sites/:/etc/nginx/sites-available
+ links:
+ - workspace
+ - php-fpm
ports:
- "88:80"
- "443:443"
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 97e5a0e..b6404b1 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -10,21 +10,30 @@ events {
}
http {
- server_tokens off;
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 15;
- types_hash_max_size 2048;
- client_max_body_size 20M;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
- gzip on;
- gzip_disable "msie6";
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-available/*;
- open_file_cache max=100;
- charset UTF-8;
-}
+ server_tokens off;
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ keepalive_timeout 15;
+ types_hash_max_size 2048;
+ client_max_body_size 20M;
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+ gzip on;
+ gzip_disable "msie6";
+ include /etc/nginx/conf.d/*.conf;
+ include /etc/nginx/sites-available/*;
+ open_file_cache max=100;
+ charset UTF-8;
+
+ map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+ }
+
+ upstream websocket {
+ server 192.168.1.2:8010;
+ }
+} \ No newline at end of file
diff --git a/nginx/sites/default.conf b/nginx/sites/default.conf
deleted file mode 100644
index ce3bf31..0000000
--- a/nginx/sites/default.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-server {
-
- listen 80;
- listen [::]:80 ipv6only=on;
-
- server_name laradock;
- root /var/www/public;
- index index.php index.html index.htm;
-
- location / {
- try_files $uri $uri/ /index.php$is_args$args;
- }
-
- location ~ \.php$ {
- try_files $uri /index.php =404;
- fastcgi_pass php-upstream;
- fastcgi_index index.php;
- fastcgi_buffers 16 16k;
- fastcgi_buffer_size 32k;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
-
- location ~ /\.ht {
- deny all;
- }
-}
-
-
-
diff --git a/nginx/sites/sample.conf.example b/nginx/sites/sample.conf.example
deleted file mode 100644
index e6520e5..0000000
--- a/nginx/sites/sample.conf.example
+++ /dev/null
@@ -1,28 +0,0 @@
-server {
-
- listen 80;
- listen [::]:80;
-
- server_name sample.dev;
- root /var/www/sample/public;
- index index.php index.html index.htm;
-
- location / {
- try_files $uri $uri/ /index.php$is_args$args;
- }
-
- location ~ \.php$ {
- try_files $uri /index.php =404;
- fastcgi_pass php-upstream;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
-
- location ~ /\.ht {
- deny all;
- }
-}
-
-
-