Skip to content

Commit

Permalink
ADD:examples
Browse files Browse the repository at this point in the history
  • Loading branch information
anak10thn committed Dec 26, 2016
1 parent cf5a987 commit bd66eea
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ build/
orcinus
test.yml
npm-debug.log
orcinus.yml
.DS_Store
6 changes: 6 additions & 0 deletions examples/http-server/orcinus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
stack: "mystack"
services:
webapp:
image: "aksaramaya/docker-http-server:v1"
ports:
- "80:80"
24 changes: 24 additions & 0 deletions examples/nas/nginx-webapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
upstream webapp {
server webapp:80;
}

server {
listen 80;
access_log /var/log/nginx/webapp.log;

# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;

# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;

location / {

proxy_pass http://webapp;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
32 changes: 32 additions & 0 deletions examples/nas/orcinus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
stack: "mystack"

services:
webapp:
image: "aksaramaya/docker-http-server:v1"
volumes:
- "yournfs"
nginx:
image: "nginx:1.9"
ports:
- 443:443
- 80:80
volumes:
- "conf"
- "logs"

volumes:
yournfs:
type: "nfs"
address: "192.168.7.11"
source: "/yournfs"
target: "/mnt"
conf:
type: "nfs"
address: "192.168.7.11"
source: "/yournfs/nginx/conf"
target: "/etc/nginx/conf.d"
logs:
type: "nfs"
address: "192.168.7.11"
source: "/yournfs/nginx/logs"
target: "/var/log/nginx"

0 comments on commit bd66eea

Please sign in to comment.