From b9a8b67e8ef2513fe3122bcbae3729c995c2acfb Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Tue, 2 Feb 2016 19:52:24 +0000 Subject: [PATCH] Various stuff --- .gitignore | 2 + docker-compose.yml | 106 ++++++++++++------------ get_compose | 4 + nginx/sites-enabled/deepsouthsounds.com | 36 ++++---- 4 files changed, 79 insertions(+), 69 deletions(-) create mode 100644 get_compose diff --git a/.gitignore b/.gitignore index 070a20f..a3c27eb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ dss.radio api_env web_env radio_env + +logs/ diff --git a/docker-compose.yml b/docker-compose.yml index 81edb78..e483b0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,18 @@ +data: + restart: "no" + image: postgres:9.4 + volumes: + - /var/lib/postgresql + command: /bin/true + +postgres: + restart: "always" + image: postgres:9.4 + volumes_from: + - data + ports: + - "5432:5432" + rabbitmq: image: tutum/rabbitmq environment: @@ -10,20 +25,20 @@ rabbitmq: redis: image: redis -postgres: - restart: "always" - image: postgres:latest - volumes_from: - - data - ports: - - "5432:5432" - -data: - restart: "no" - image: postgres:latest - volumes: - - /var/lib/postgresql - command: /bin/true +api: + image: fergalmoran/dss.api + volumes: + - /files + ports: + - "8001:8001" + env_file: + - ./api_env + links: + - postgres + - redis +# - icecast + - rabbitmq + command: ./run_web.sh celery: image: fergalmoran/dss.api @@ -37,21 +52,6 @@ celery: - "rabbitmq:rabbitmq" command: ./run_celery.sh -api: - image: fergalmoran/dss.api - volumes: - - /files - ports: - - "8001:8001" - env_file: - - ./api_env - links: - - "postgres:postgres" - - "redis:redis" - - "icecast:icecast" - - "rabbitmq:rabbitmq" - command: ./run_web.sh - web: image: fergalmoran/dss.web env_file: @@ -61,26 +61,29 @@ web: - "redis:redis" ports: - "8080:8080" -icecast: - build: ./icecast/ - volumes: - - ./logs:/var/log/icecast2 - - /etc/localtime:/etc/localtime:ro - environment: - - ICECAST_SOURCE_PASSWORD=RDzNlgqmj67vk - - ICECAST_ADMIN_PASSWORD=CrVuP5evoJZ0 - - ICECAST_RELAY_PASSWORD=9PmUbI1mLne9o - ports: - - 8000:8000 -radio: - image: fergalmoran/dss.radio - env_file: - - ./radio_env - ports: - - "8888:8888" - links: - - "icecast:icecast" - - "api:api" + +#icecast: +# build: ./icecast/ +# volumes: +# - ./logs:/var/log/icecast2 +# - /etc/localtime:/etc/localtime:ro +# environment: +# - ICECAST_SOURCE_PASSWORD=RDzNlgqmj67vk +# - ICECAST_ADMIN_PASSWORD=CrVuP5evoJZ0 +# - ICECAST_RELAY_PASSWORD=9PmUbI1mLne9o +# ports: +# - 8000:8000 + +#radio: +# image: fergalmoran/dss.radio +# env_file: +# - ./radio_env +# ports: +# - "8888:8888" +# links: +# - "icecast:icecast" +# - "api:api" + nginx: restart: "always" build: ./nginx/ @@ -90,7 +93,8 @@ nginx: links: - "api:api" - "web:web" - - "icecast:icecast" - - "radio:radio" + # - "icecast:icecast" + # - "radio:radio" volumes_from: - api + diff --git a/get_compose b/get_compose new file mode 100644 index 0000000..f41ef50 --- /dev/null +++ b/get_compose @@ -0,0 +1,4 @@ +#!/bin/bash +mkdir -p /opt/bin +curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose +chmod +x /opt/bin/docker-compose diff --git a/nginx/sites-enabled/deepsouthsounds.com b/nginx/sites-enabled/deepsouthsounds.com index c5f6a76..4de3a1b 100644 --- a/nginx/sites-enabled/deepsouthsounds.com +++ b/nginx/sites-enabled/deepsouthsounds.com @@ -1,21 +1,21 @@ -server { - listen 80; - server_name radio.deepsouthsounds.com; - - location /a { - proxy_pass http://radio:8888; - 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://icecast: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; - } -} +#server { +# listen 80; +# server_name radio.deepsouthsounds.com; +# +# location /a { +# proxy_pass http://radio:8888; +# 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://icecast: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; +# } +#} server { listen 80;