cannot get azuracast to run with docker and nginx

March 27, 2018 960 views
Applications Deployment Configuration Management Getting Started Initial Server Setup Docker Let's Encrypt Linux Basics Ubuntu 16.04

**
Hello all,

I am new and newbee confused... Dear dear oh my dear,

I really hope someone can help me out.

I have been trying for days now to set up azuracast on a droplet that is preconfigured with docker (Ubuntu Docker 17.12.0~ce on 16.04) …with minimum succes.

It is my first droplet and - although I understand some - I am not a coder…

I installed the droplet, then managed to install azuracast and got the webinterface running. Although it was not broadcasting yet. The stream would be stuck on loading the whole time.

Then in the process of installing ssh and ssl also nginx and certbot were installed. And with that the webinterface of azuracast has disappeared. Enginx has taken over all the ports.

Eversince then I have been trying to change configurationfiles and change ports. But unfortunately I am too much of a noob to get it sorted out.
I am doing something wrong and possibly the programms are conflicting or having a bug. And I cannot figure out exactely what the issues are and how to fix them.

Very unfortunate, because I like it here in DO and azuracast also seems really nice. My main goal for now is to set up a radiostation.

All I have tried to accomplish was done via tutorials from DO and azuracast and googling.

What I think needs doing is:
Configure the port right inside the config files
somehow reroute traffic to the new directory with this adjusted docker-compose.yml
maybe reset the firewall settings
dubbelcheck the ssl settings

I wanted to install portainer to see if that would help me tackle the problems, but…also there the message is:

Error response from daemon: driver failed programming external connectivity on endpoint gifted_bardeen (12bb79f1b96816ebafba4133443d83c171c29447ebf7631daa750445159409fe): Bind for 0.0.0.0:9000 failed: *port is already allocated.

I hope someone can tell me what to do – in simple terms (possibly in copy/paste-style :)
Alternatively if there is such a droplet preconfigured available that would be even better …

I have included below here the complete configfiles of docker and nginx, aswell as a little root tree and an overview of the ports that are taken. I have highlighted where I think things go wrong.
If anything else I can do to clarify...

Thnx for your time!

Br,

============================================================================================
.
├── acconf
│ ├── docker-compose.yml
│ └── ssh
└── acconfreroute

└── docker-compose.yml

GNU nano 2.5.3 File: docker-compose.yml

version: '2.2'

services:
web:
image: azuracast/azuracastweb:latest
# Uncomment the lines below to build this image locally (Developer option)
# build:
# context: ../docker-azuracast-web
depends
on:
- mariadb
- influxdb
- stations
- redis
environment: &default-environment
APPLICATIONENV: "production" # "production" or "development"
MYSQL
HOST: "mariadb" # You can change this if you plan to connect to an external DB host.
MYSQLPORT: 3306 # ^
MYSQL
USER: "azuracast" # Once the database has been installed, don't change this.
MYSQLPASSWORD: "azur4c457" # ^
MYSQL
DATABASE: "azuracast" # ^
MYSQLRANDOMROOTPASSWORD: "yes"
volumes:
# - www
data:/var/azuracast/www
# For development, comment the line above and uncomment the line below.
# - .:/var/azuracast/www
- tmpdata:/var/azuracast/wwwtmp
- station_data:/var/azuracast/stations
init: true
restart: always

nginx:
image: azuracast/azuracastnginx:latest
# Uncomment the lines below to build this image locally (Developer option)
# build:
# context: ../docker-azuracast-nginx
ports:
- '8000:80'
- '443:443'
depends
on:
- web
- stations
volumes:
# - wwwdata:/var/azuracast/www
# For development, comment the line above and uncomment the line below.
- /acconfreroute/docker-compose.yml:/var/azuracast/www
- nginx
letsencryptcerts:/etc/nginx/ssl
- nginx
letsencrypt_www:/var/www/letsencrypt
restart: always

# docker-compose run --rm letsencrypt \
# certonly --webroot -w /var/www/letsencrypt
letsencrypt:
image: certbot/certbot
command: /bin/true
volumes:
- nginxletsencryptcerts:/etc/letsencrypt
- nginxletsencryptwww:/var/www/letsencrypt

mariadb:
image: mariadb:10.2
# Uncomment to expose MariaDB to the host computer (for testing only!)
# ports:
# - "127.0.0.1:3306:3306"
volumes:
- db_data:/var/lib/mysql
environment:
<< : *default-environment
restart: always

influxdb:
image: influxdb:1.4-alpine
volumes:
- influx_data:/var/lib/influxdb
restart: always

redis:
image: redis:4.0-alpine
# Uncomment to expose Redis to the host computer (for testing only!)

ports:

#  - "127.0.0.1:6379:6379"
restart: always

cron:
containername: azuracastcron
image: azuracast/azuracastweb:latest
volumes
from:
- web
depends_on:
- mariadb
- influxdb
- stations
- redis
environment:
<< : *default-environment
command: 'cron'
init: true
restart: always

cli:
image: azuracast/azuracastweb:latest
volumes
from:
- web
dependson:
- mariadb
- influxdb
- stations
- redis
environment:
<< : *default-environment
user: 'azuracast'
working
dir: '/var/azuracast/www'
command: 'bash'
tty: true # Pretty colors
init: true

stations:
containername: azuracaststations
image: azuracast/azuracast_stations:latest

Enable the lines below to build the image locally (Developer option)

# build:
#   context: ../docker-azuracast-stations
ports:
# Uncomment the line below to expose the full range of available station ports.
# Note: This is not recommended currently due to performance and memory usage problems with Docker.
# - '8000-8500:8000-8500'

 - '8005:8005'
 - '8006:8006'
 - '8010:8010'

# Enable the lines below to build the image locally (Developer option)
# build:
# context: ../docker-azuracast-stations
ports:
# Uncomment the line below to expose the full range of available station ports.
# Note: This is not recommended currently due to performance and memory usage problems with Docker.
# - '8000-8500:8000-8500'
xxxxxxxx
- '8005:8005'
- '8006:8006'
- '8010:8010'
- '8015:8015'
- '8016:8016'
- '8020:8020'
- '8025:8025'
- '8026:8026'
- '8030:8030'
- '8035:8035'
- '8036:8036'
- '8040:8040'
- '8045:8045'
- '8046:8046'
- '8050:8050'
- '8055:8055'
- '8056:8056'
- '8060:8060'
- '8065:8065'
- '8066:8066'
- '8070:8070'
- '8075:8075'
- '8076:8076'
xxxxxxxxx
- '8085:8085'
- '8086:8086'
- '8090:8090'
- '8095:8095'
- '8096:8096'
volumes:
- stationdata:/var/azuracast/stations
- nginx
letsencrypt_certs:/etc/nginx/ssl:ro
init: true
restart: always

# Developer Mode services
# static:
# build:
# context: ./util/docker/static
# volumes:
# - ./web/static:/data
#
# chronograf:
# image: chronograf:alpine
# ports:
# - "8888:8888"
# command: "chronograf --influxdb-url=http://influxdb:8086"

volumes:
nginxletsencryptcerts: {}
nginxletsencryptwww: {}
dbdata: {}
influx
data: {}
stationdata: {}
www
data: {}
tmp_data: {}

==============================================================================================

root@111010111:~# sudo lsof -i -P -n | grep LISTEN
sshd 1581 root 3u IPv4 16713 0t0 TCP *:22 (LISTEN)
sshd 1581 root 4u IPv6 16723 0t0 TCP *:22 (LISTEN)
nginx 1716 root 6u IPv4 17698 0t0 TCP *:80 (LISTEN)
nginx 1716 root 7u IPv6 17699 0t0 TCP *:80 (LISTEN)
nginx 1716 root 8u IPv6 17700 0t0 TCP *:443 (LISTEN)
nginx 1716 root 9u IPv4 17701 0t0 TCP *:443 (LISTEN)
nginx 1721 www-data 6u IPv4 17698 0t0 TCP *:80 (LISTEN)
nginx 1721 www-data 7u IPv6 17699 0t0 TCP *:80 (LISTEN)
nginx 1721 www-data 8u IPv6 17700 0t0 TCP *:443 (LISTEN)
nginx 1721 www-data 9u IPv4 17701 0t0 TCP *:443 (LISTEN)
docker-pr 2370 root 4u IPv6 19938 0t0 TCP *:8096 (LISTEN)
docker-pr 2600 root 4u IPv6 20283 0t0 TCP *:8095 (LISTEN)
docker-pr 3115 root 4u IPv6 21815 0t0 TCP *:8090 (LISTEN)
docker-pr 3237 root 4u IPv6 22215 0t0 TCP *:8086 (LISTEN)
docker-pr 3250 root 4u IPv6 22261 0t0 TCP *:8085 (LISTEN)
docker-pr 3260 root 4u IPv6 22302 0t0 TCP *:8076 (LISTEN)
docker-pr 3271 root 4u IPv6 22338 0t0 TCP *:8075 (LISTEN)
docker-pr 3348 root 4u IPv6 22734 0t0 TCP *:8070 (LISTEN)
docker-pr 3358 root 4u IPv6 22820 0t0 TCP *:8066 (LISTEN)
docker-pr 3368 root 4u IPv6 22882 0t0 TCP *:8065 (LISTEN)
docker-pr 3378 root 4u IPv6 22990 0t0 TCP *:8060 (LISTEN)
docker-pr 3399 root 4u IPv6 23059 0t0 TCP *:8056 (LISTEN)
docker-pr 3432 root 4u IPv6 23161 0t0 TCP *:8055 (LISTEN)
docker-pr 3445 root 4u IPv6 23202 0t0 TCP *:8050 (LISTEN)
docker-pr 3456 root 4u IPv6 23241 0t0 TCP *:8046 (LISTEN)
docker-pr 3467 root 4u IPv6 23279 0t0 TCP *:8045 (LISTEN)
docker-pr 3478 root 4u IPv6 23320 0t0 TCP *:8040 (LISTEN)
docker-pr 3489 root 4u IPv6 23350 0t0 TCP *:8036 (LISTEN)
docker-pr 3505 root 4u IPv6 23420 0t0 TCP *:8035 (LISTEN)
docker-pr 3520 root 4u IPv6 23487 0t0 TCP *:8030 (LISTEN)
docker-pr 3539 root 4u IPv6 23601 0t0 TCP *:8026 (LISTEN)
docker-pr 3549 root 4u IPv6 23638 0t0 TCP *:8025 (LISTEN)
docker-pr 3559 root 4u IPv6 23667 0t0 TCP *:8020 (LISTEN)
docker-pr 3570 root 4u IPv6 23695 0t0 TCP *:8005 (LISTEN)
docker-pr 3581 root 4u IPv6 23722 0t0 TCP *:8006 (LISTEN)
docker-pr 3591 root 4u IPv6 23758 0t0 TCP *:8016 (LISTEN)
docker-pr 3602 root 4u IPv6 23785 0t0 TCP *:8015 (LISTEN)
docker-pr 3613 root 4u IPv6 23815 0t0 TCP *:8010 (LISTEN)
docker-pr 4544 root 4u IPv6 36972 0t0 TCP *:9000 (LISTEN)

=============================================================================================

GNU nano 2.5.3 File: /etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
workerconnections 768;
# multi
accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip off;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/$

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

}

mail {

# See sample authentication script at:

# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

# auth_http localhost/auth.php;

# pop3_capabilities "TOP" "USER";

# imap_capabilities "IMAP4rev1" "UIDPLUS";

server {

listen localhost:110;

protocol pop3;

proxy on;

server {

listen localhost:143;

protocol imap;

proxy on;

}

Be the first one to answer this question.