From 1d70f973478f813eb12cec76a1baed0e42a79d63 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 00:40:07 -0600 Subject: [PATCH] conf: added example conf for nginx proxy Signed-off-by: rscnt --- configs/docker.services.yml | 27 +++++++++++++++++++++++++++ configs/nginx.dynamicweb.conf | 24 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 configs/docker.services.yml create mode 100644 configs/nginx.dynamicweb.conf diff --git a/configs/docker.services.yml b/configs/docker.services.yml new file mode 100644 index 00000000..eada936a --- /dev/null +++ b/configs/docker.services.yml @@ -0,0 +1,27 @@ +postgresql: + image: postgres + env_file: envs/psql.env + hostname: db + ports: + - "5432:5432" + +nginx: + image: nginx + env_file: envs/nginx.env + hostname: proxy + volumes: + - sites-enabled:/etc/nginx/conf.d + ports: + - "8000:8000" + +memcached: + image: memcached + env_file: envs/memcached.env + hostname: cache + +dynamicweb: + build: . + links: + - memcached + - db + - proxy \ No newline at end of file diff --git a/configs/nginx.dynamicweb.conf b/configs/nginx.dynamicweb.conf new file mode 100644 index 00000000..42100381 --- /dev/null +++ b/configs/nginx.dynamicweb.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name destruction.io; + + location /static/ { + alias /home/r/dinamycweb/static/; + } + + location /media/ { + alias /home/r/dinamycweb/media/; + } + + location / { + proxy_pass http://localhost:8080/; + proxy_pass_header Server; + proxy_set_header Host $host; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + } +}