Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormattos committed Dec 4, 2020
0 parents commit db856ea
Show file tree
Hide file tree
Showing 9 changed files with 732 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/volumes/conf.d/default.conf
/volumes/certs
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# documentation

Read https://github.com/nginx-proxy/nginx-proxy and https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion/
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "3.7"

networks:
reverse-proxy:
external: true
name: reverse-proxy
internal:
driver: bridge

services:
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./volumes/vhost.d/:/etc/nginx/vhost.d
- ./volumes/conf.d:/etc/nginx/conf.d
- ./volumes/certs:/etc/nginx/certs:ro
- ./volumes/html:/usr/share/nginx/html
networks:
- reverse-proxy

nginx-letsencrypt:
container_name: nginx-letsencrypt
image: jrcs/letsencrypt-nginx-proxy-companion
restart: unless-stopped
networks:
- reverse-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./volumes/vhost.d/:/etc/nginx/vhost.d
- ./volumes/certs:/etc/nginx/certs:rw
- ./volumes/html:/usr/share/nginx/html
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
2 changes: 2 additions & 0 deletions volumes/conf.d/client_max_body_size.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
client_max_body_size 0;

1 change: 1 addition & 0 deletions volumes/conf.d/server_tokens.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server_tokens off;
4 changes: 4 additions & 0 deletions volumes/conf.d/timeout.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
send_timeout 3600;
10 changes: 10 additions & 0 deletions volumes/vhost.d/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Start of configuration add by letsencrypt container
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
auth_request off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
## End of configuration add by letsencrypt container
10 changes: 10 additions & 0 deletions volumes/vhost.d/default_location
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Expose-Headers "Authorization, Bearer, Device";
add_header Access-Control-Allow-Methods "POST, PATCH, DELETE, PUT, GET, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Authorization, Bearer, Accept, Content-Type, Device";
add_header Access-Control-Allow-Credentials true;
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}

0 comments on commit db856ea

Please sign in to comment.