Added nginx

This commit is contained in:
Fergal Moran
2015-07-24 23:23:30 +01:00
parent 72e1850922
commit 9599e767d0
5 changed files with 45 additions and 0 deletions

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "dss.api"] [submodule "dss.api"]
path = dss.api path = dss.api
url = git@github.com:fergalmoran/dss.api.git url = git@github.com:fergalmoran/dss.api.git
[submodule "dss.web"]
path = dss.web
url = git@github.com:fergalmoran/dss.web.git

View File

@@ -22,3 +22,23 @@ data:
volumes: volumes:
- /var/lib/postgresql - /var/lib/postgresql
command: /bin/true command: /bin/true
web:
restart: always
build: ./dss.web
links:
- "redis:redis"
ports:
- "8080:8080"
redis:
image: redis
nginx:
restart: always
build: ./nginx/
ports:
- "81:81"
links:
- "api:api"
- "web:web"

1
dss.web Submodule

Submodule dss.web added at 505d34ac5f

3
nginx/Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM tutum/nginx
RUN rm /etc/nginx/sites-enabled/default
ADD sites-enabled/ /etc/nginx/sites-enabled

View File

@@ -0,0 +1,18 @@
server{
listen 81;
server_name www.deepsouthsounds.com ext-test.deepsouthsounds.com deepsouthsounds.com;
location /api {
proxy_pass http://api:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://web:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}