From 645a211b52d39f6d79cb95df37a5aa5d14d15293 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Sun, 6 Dec 2015 16:59:41 +0000 Subject: [PATCH] Some changes --- docker-compose.yml | 8 ++++---- nginx/sites-enabled/deepsouthsounds.com | 18 ++++++++++++++++-- rebuild.sh | 7 +------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d25e68d..81edb78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ redis: image: redis postgres: - restart: always + restart: "always" image: postgres:latest volumes_from: - data @@ -19,7 +19,7 @@ postgres: - "5432:5432" data: - restart: no + restart: "no" image: postgres:latest volumes: - /var/lib/postgresql @@ -56,7 +56,7 @@ web: image: fergalmoran/dss.web env_file: - ./web_env - restart: always + restart: "always" links: - "redis:redis" ports: @@ -82,7 +82,7 @@ radio: - "icecast:icecast" - "api:api" nginx: - restart: always + restart: "always" build: ./nginx/ ports: - "80:80" diff --git a/nginx/sites-enabled/deepsouthsounds.com b/nginx/sites-enabled/deepsouthsounds.com index aaa0eb8..c5f6a76 100644 --- a/nginx/sites-enabled/deepsouthsounds.com +++ b/nginx/sites-enabled/deepsouthsounds.com @@ -21,10 +21,14 @@ server { listen 80; server_name api.deepsouthsounds.com api-test.deepsouthsounds.com; client_max_body_size 0; - + location /assets/grappelli { alias /usr/local/lib/python2.7/site-packages/grappelli/static/grappelli; } + + location /assets { + alias /files/static; + } location / { proxy_pass http://api:8001; @@ -45,6 +49,7 @@ server { listen 443 default ssl; server_name www.deepsouthsounds.com ext-test.deepsouthsounds.com; + root /files/static/; ssl_certificate /etc/nginx/ssl/dss.crt; ssl_certificate_key /etc/nginx/ssl/dss.key; @@ -55,11 +60,20 @@ server { client_max_body_size 250M; + location ~ /\.(eot|otf|ttf|woff)$ { + add_header Access-Control-Allow-Origin *; + } + location /media { alias /files/media; } - location / { + #if ($request_filename ~* ^.*?/([^/]*?)$) { + # set $filename $1; + #} + #if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ + # add_header Access-Control-Allow-Origin *; + #} proxy_pass http://web:8080; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/rebuild.sh b/rebuild.sh index dadf9c5..5dcf63e 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -1,6 +1 @@ -export PATH=$PATH:/mnt/bin/ -git pull && \ - cd dss.web && git pull && cd .. && \ - cd dss.api && git pull && cd .. && \ - cd dss.radio && git pull && cd .. && \ - docker-compose build && docker-compose up $1 +docker-compose pull && docker-compose build && docker-compose up -d