diff --git a/.gitignore b/.gitignore index 07ee2c2..070a20f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ dss.web dss.api dss.radio + +api_env +web_env +radio_env diff --git a/.ropeproject/globalnames b/.ropeproject/globalnames index c2b5132..add4d5a 100644 Binary files a/.ropeproject/globalnames and b/.ropeproject/globalnames differ diff --git a/docker-compose.yml b/docker-compose.yml index 1e40eca..ce526cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,11 +2,14 @@ rabbitmq: image: tutum/rabbitmq environment: - RABBITMQ_PASS=wZ59kFTJZN8YQ - ports: + ports: - "4369:4369" - "5672:5672" - "15672:15672" +redis: + image: redis + postgres: restart: always image: postgres:latest @@ -15,9 +18,6 @@ postgres: ports: - "5432:5432" -redis: - image: redis - data: restart: no image: postgres:latest @@ -26,7 +26,9 @@ data: command: /bin/true celery: - build: ./dss.api + image: fergalmoran/dss.api + env_file: + - ./api_env volumes_from: - api links: @@ -36,11 +38,13 @@ celery: command: ./run_celery.sh api: - build: ./dss.api + image: fergalmoran/dss.api volumes: - /files ports: - "8001:8001" + env_file: + - ./api_env links: - "postgres:postgres" - "redis:redis" @@ -49,13 +53,34 @@ api: command: ./run_web.sh web: + image: fergalmoran/dss.web + env_file: + - ./web_env restart: always - build: ./dss.web links: - "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" nginx: restart: always build: ./nginx/ @@ -67,24 +92,3 @@ nginx: - "web:web" - "icecast:icecast" - "radio:radio" - volumes_from: - - api -icecast: - build: ./radio/ - 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: - build: dss.radio/ - ports: - - "8888:8888" - links: - - "icecast:icecast" - - "api:api" - diff --git a/radio/Dockerfile b/icecast/Dockerfile similarity index 90% rename from radio/Dockerfile rename to icecast/Dockerfile index fd18a17..bd5a927 100644 --- a/radio/Dockerfile +++ b/icecast/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:trusty -MAINTAINER Manfred Touron "m@42.am" +MAINTAINER Fergal Moran "Ferg@lMoran.me" ENV DEBIAN_FRONTEND noninteractive diff --git a/radio/LICENSE.md b/icecast/LICENSE.md similarity index 100% rename from radio/LICENSE.md rename to icecast/LICENSE.md diff --git a/radio/README.md b/icecast/README.md similarity index 100% rename from radio/README.md rename to icecast/README.md diff --git a/radio/etc/icecast2/admin/listclients.xsl b/icecast/etc/icecast2/admin/listclients.xsl similarity index 100% rename from radio/etc/icecast2/admin/listclients.xsl rename to icecast/etc/icecast2/admin/listclients.xsl diff --git a/radio/etc/icecast2/admin/listmounts.xsl b/icecast/etc/icecast2/admin/listmounts.xsl similarity index 100% rename from radio/etc/icecast2/admin/listmounts.xsl rename to icecast/etc/icecast2/admin/listmounts.xsl diff --git a/radio/etc/icecast2/admin/manageauth.xsl b/icecast/etc/icecast2/admin/manageauth.xsl similarity index 100% rename from radio/etc/icecast2/admin/manageauth.xsl rename to icecast/etc/icecast2/admin/manageauth.xsl diff --git a/radio/etc/icecast2/admin/moveclients.xsl b/icecast/etc/icecast2/admin/moveclients.xsl similarity index 100% rename from radio/etc/icecast2/admin/moveclients.xsl rename to icecast/etc/icecast2/admin/moveclients.xsl diff --git a/radio/etc/icecast2/admin/response.xsl b/icecast/etc/icecast2/admin/response.xsl similarity index 100% rename from radio/etc/icecast2/admin/response.xsl rename to icecast/etc/icecast2/admin/response.xsl diff --git a/radio/etc/icecast2/admin/stats.xsl b/icecast/etc/icecast2/admin/stats.xsl similarity index 100% rename from radio/etc/icecast2/admin/stats.xsl rename to icecast/etc/icecast2/admin/stats.xsl diff --git a/radio/etc/icecast2/admin/updatemetadata.xsl b/icecast/etc/icecast2/admin/updatemetadata.xsl similarity index 100% rename from radio/etc/icecast2/admin/updatemetadata.xsl rename to icecast/etc/icecast2/admin/updatemetadata.xsl diff --git a/radio/etc/icecast2/admin/xspf.xsl b/icecast/etc/icecast2/admin/xspf.xsl similarity index 100% rename from radio/etc/icecast2/admin/xspf.xsl rename to icecast/etc/icecast2/admin/xspf.xsl diff --git a/radio/etc/icecast2/icecast.xml b/icecast/etc/icecast2/icecast.xml similarity index 100% rename from radio/etc/icecast2/icecast.xml rename to icecast/etc/icecast2/icecast.xml diff --git a/radio/etc/icecast2/web/auth.xsl b/icecast/etc/icecast2/web/auth.xsl similarity index 100% rename from radio/etc/icecast2/web/auth.xsl rename to icecast/etc/icecast2/web/auth.xsl diff --git a/radio/etc/icecast2/web/server_version.xsl b/icecast/etc/icecast2/web/server_version.xsl similarity index 100% rename from radio/etc/icecast2/web/server_version.xsl rename to icecast/etc/icecast2/web/server_version.xsl diff --git a/radio/etc/icecast2/web/status.xsl b/icecast/etc/icecast2/web/status.xsl similarity index 100% rename from radio/etc/icecast2/web/status.xsl rename to icecast/etc/icecast2/web/status.xsl diff --git a/radio/etc/icecast2/web/status2.xsl b/icecast/etc/icecast2/web/status2.xsl similarity index 100% rename from radio/etc/icecast2/web/status2.xsl rename to icecast/etc/icecast2/web/status2.xsl diff --git a/radio/etc/icecast2/web/style.css b/icecast/etc/icecast2/web/style.css similarity index 100% rename from radio/etc/icecast2/web/style.css rename to icecast/etc/icecast2/web/style.css diff --git a/radio/etc/supervisord.conf b/icecast/etc/supervisord.conf similarity index 100% rename from radio/etc/supervisord.conf rename to icecast/etc/supervisord.conf diff --git a/radio/examples/docker-compose.yml b/icecast/examples/docker-compose.yml similarity index 100% rename from radio/examples/docker-compose.yml rename to icecast/examples/docker-compose.yml diff --git a/radio/start.sh b/icecast/start.sh similarity index 96% rename from radio/start.sh rename to icecast/start.sh index 79dc99b..ca93e6a 100755 --- a/radio/start.sh +++ b/icecast/start.sh @@ -20,6 +20,4 @@ if [ -n "$ICECAST_PASSWORD" ]; then sed -i "s/[^<]*<\/password>/$ICECAST_PASSWORD<\/password>/g" /etc/icecast2/icecast.xml fi -cat /etc/icecast2/icecast.xml - supervisord -n -c /etc/supervisord.conf diff --git a/postgres/scaffold_db.sh b/postgres/scaffold_db.sh index b0a56fb..0454bd7 100755 --- a/postgres/scaffold_db.sh +++ b/postgres/scaffold_db.sh @@ -1,5 +1,6 @@ #!/bin/bash +sudo -u postgres psql -h 127.0.0.1 -c "CREATE DATABASE deepsouthsounds" sudo -u postgres psql -h 127.0.0.1 -c "CREATE USER deepsouthsounds WITH PASSWORD 'deepsouthsounds'" sudo -u postgres psql -h 127.0.0.1 -c "CREATE DATABASE deepsouthsounds OWNER deepsouthsounds" -sudo -u postgres psql -h 127.0.0.1 deepsouthsounds < /home/fergalm/Dropbox/dss.sql \ No newline at end of file +sudo -u postgres psql -h 127.0.0.1 deepsouthsounds < /tmp/20151025-203518.sql