Successfully ran docker-compose up --build -d on MacOS, but nothing happens after

Hi, I am trying to get a local version of Xibo running on my machine so that I can work on extending/integrating. I followed all the instructions (per https://github.com/xibosignage/xibo-cms) and ran docker-compose up --build -d, yielding an output of:

Successfully built f20745f5e3b2
Successfully tagged xibo-cms_web:latest
xibo-cms_db_1 is up-to-date
xibo-cms_quickchart_1 is up-to-date
xibo-cms_web_1 is up-to-date
xibo-cms_xmr_1 is up-to-date
xibo-cms_swagger_1 is up-to-date

But nothing happens afterword? How do I access the application?

Same behaviour on Ubuntu and using Xibo version 1.8.13 (https://github.com/xibosignage/xibo-cms/tree/1.8.13), I know I’m missing a step or doing something stupid

LOGS FROM xibo-cms_web container

MySQL Connection Details:
Username: root
Password: root
DB: cms
Host: db
XMR Connection Details:
Host: xmr
CMS Port: 50001
Player Port: 9505
Starting Webserver
Waiting for MySQL to start - max 300 seconds
MySQL started
Updating settings.php
ERROR 1146 (42S02) at line 1: Table 'cms.setting' doesn't exist
New install
Provisioning Database
Phinx by CakePHP - https://phinx.org. 0.9.2
using config file .varwwwcmsphinx.php
using config parser php
using migration paths
- /var/www/cms/db/migrations
warning no environment specified, defaulting to: production
using adapter mysql
using database cms
....
....
....
All Done. Took 8.0991s
Configuring Database Settings
Setting up Maintenance
Starting webserver
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.6. Set the 'ServerName' directive globally to suppress this message

You access it in a web browser on whatever ports are defined in your docker-compose file.

@alex Here is the docker compose file:

version: "3"

services:
  db:
    image: mysql:5.6
    ports:
    - 3315:3306
    volumes:
    - ./containers/db:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: "root"
      MYSQL_DATABASE: "cms"

  xmr:
    image: xibosignage/xibo-xmr:latest
    ports:
    - "9505:9505"
    environment:
      XMR_DEBUG: "true"
      IPV6RESPSUPPORT: "false"
      IPV6PUBSUPPORT: "false"

  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
    - ./:/var/www/cms
    ports:
    - "81:81"
    environment:
      CMS_DEV_MODE: "true"
      MYSQL_DATABASE: "cms"

  swagger:
    image: swaggerapi/swagger-ui:latest
    ports:
    - "8081:8081"
    environment:
    - API_URL=http://localhost/swagger.json

  quickchart:
    image: ianw/quickchart

I cannot access it at any of these ports? What should the full URL be

It’ll be on your local machine, port 81. If you’re running Docker on a Mac, then you may need to forward ports in the VM that Docker uses to be able to access those.

@alex Does Ubuntu running in virtual box require additional configuration as well?

If your Ubuntu VM is in bridged mode then no - it’ll just work.

You’d access the CMS inside the VM at http://localhost:81 and from your host machine at the VM’s IP address on port 81.

@alex
Okay getting desperate, started from scratch (Virtualbox Ubuntu VM with bridged mode OFF) with
version 1.8.13 as per the github link
With the default settings I get an EADDINUSE error for port 80. I went into the docker-compose.yml file and changed:

  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
    - ./:/var/www/cms
    ports:
    - "82:82"
    environment:
      CMS_DEV_MODE: "true"
      MYSQL_DATABASE: "cms"

Changing “80:80” to “82:82”

Now it builds with docker-compose and everything seems fine. But navigating to localhost (in Ubuntu VM) port 82 does not work. It says the site may be temporarily busy “Unable to Connect” on firefox

Here is output of ports in use:

systemd-r  350 systemd-resolve   13u  IPv4  14793      0t0  TCP 127.0.0.53:53 (LISTEN)
cupsd      474            root    6u  IPv6  17562      0t0  TCP [::1]:631 (LISTEN)
cupsd      474            root    7u  IPv4  17563      0t0  TCP 127.0.0.1:631 (LISTEN)
container  599            root    7u  IPv4  19609      0t0  TCP 127.0.0.1:46479 (LISTEN)
apache2    635            root    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2    650        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2    651        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2    652        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2    653        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2    654        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)
apache2   3749        www-data    4u  IPv6  18924      0t0  TCP *:80 (LISTEN)

Try running docker ps to see whats running after you’ve up'ed - just in case the container is stopping for some reason

Its just Apache sitting in there, nothing fancy

Unless you’ve a particular reason you want to use develop or release22, not 1.8 (which is over a year old now).

@dan @alex
I really appreciate your help on this, thank you.
We’re using this particular version because it’s more barebones for the functionality we want to extend. But the result of docker ps is:

CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                               NAMES
2f7c8b413831        xibocms_web                    "/entrypoint.sh"         2 hours ago         Up 8 seconds        80/tcp, 0.0.0.0:82->82/tcp          xibocms_web_1
10e6e4747754        swaggerapi/swagger-ui:latest   "sh /usr/share/nginx…"   4 hours ago         Up 7 seconds        80/tcp, 0.0.0.0:8080->8080/tcp      xibocms_swagger_1
13e7e76d6306        mysql:5.6                      "docker-entrypoint.s…"   7 hours ago         Up 10 seconds       0.0.0.0:3315->3306/tcp              xibocms_db_1
7a5d5389bbd5        xibosignage/xibo-xmr:latest    "/entrypoint.sh"         7 hours ago         Up 9 seconds        0.0.0.0:9505->9505/tcp, 50001/tcp   xibocms_xmr_1
15aa2714273a        ianw/quickchart                "yarn start"             7 hours ago         Up 7 seconds        3400/tcp                            xibocms_quickchart_1

Ive not built a fresh 1.8 dev environment for several years now, so I can’t be 100% sure that what is there will work out the box.

You might need to exec into your web container and make sure everything looks good inside there docker exec -it xibocms_web_1 sh

Or it might be a PHP error (although I think you’d except to see a 500 rather than a network error when accessing). However to rule that out you could put error_reporting / display_errors at the top of web/index.php

Ah!

ports:
    - "82:82"

This is mapping “inside port” to “outside port”. The inside port is 80, not 82.

1 Like

What Dan says; I just got bit by that myself.

Don’t change both 80’s to 82, only the second one:

ports:
- “80:82”

Then you should (after a ‘down’ and an ‘up’) be able to point a browser at localhost:82, and get your login prompt.

1 Like
The Xibo Community site uses cookies. What are cookies?