CMS Version
3.3.3 (latest)
Installation Method
Docker
Operating System
Debian 11
Issue
I try to use Docker Swarm and Traefik (reverse proxy) with Xibo Web and XMR
This is my docker file:
version: "3.1"
services:
xibo3-db:
image: mysql:5.7
volumes:
- "./shared/db:/var/lib/mysql:Z"
environment:
- MYSQL_DATABASE=cms
- MYSQL_USER=cms
- MYSQL_PASSWORD=1234
- MYSQL_RANDOM_ROOT_PASSWORD=yes
networks:
- xibo3-net
deploy:
placement:
constraints:
- node.labels.xibo_3_db==true
resources:
limits:
memory: 1G
xibo3-xmr:
image: xibosignage/xibo-xmr:0.9
env_file: config.env
networks:
- traefik-net
- xibo3-net
deploy:
resources:
limits:
memory: 256M
labels:
- traefik.enable=true
- traefik.docker.network=traefik-net
- traefik.constraint-label=pst-traefik
- traefik.tcp.routers.xibo3-xmr.rule=HostSNI(`*`)
- traefik.tcp.routers.xibo3-xmr.entrypoints=xibo-xmr
- traefik.tcp.routers.xibo3-xmr.service=xibo3-xmr
- traefik.tcp.services.xibo3-xmr.loadbalancer.server.port=9505
xibo3-web:
image: xibosignage/xibo-cms:release-3.3.3
volumes:
- "./shared/cms/custom:/var/www/cms/custom:Z"
- "./shared/backup:/var/www/backup:Z"
- "./shared/cms/web/theme/custom:/var/www/cms/web/theme/custom:Z"
- "./shared/cms/library:/var/www/cms/library:Z"
- "./shared/cms/web/userscripts:/var/www/cms/web/userscripts:Z"
- "./shared/cms/ca-certs:/var/www/cms/ca-certs:Z"
environment:
- XMR_HOST=xibo3-xmr
- CMS_USE_MEMCACHED=true
- MEMCACHED_HOST=xibo3-memcached
- MEMCACHED_PORT=11211
- CMS_QUICK_CHART_URL=http://xibo3-quickchart:3400
- XTR_ENABLED=false
- MYSQL_HOST=xibo3-db
- MYSQL_PORT=3306
- MYSQL_DATABASE=cms
- MYSQL_USER=cms
- MYSQL_PASSWORD=1234
networks:
- xibo3-net
- traefik-net
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik-net
- traefik.http.routers.xibo3-http.rule=Host(`xibo.domain.local`)
- traefik.http.routers.xibo3-http.entrypoints=http
- traefik.http.routers.xibo3-http.middlewares=redirect-to-https
- traefik.http.routers.xibo3-https.rule=Host(`domain.local`)
- traefik.http.routers.xibo3-https.entrypoints=https
- traefik.http.routers.xibo3-https.tls=true
- traefik.http.routers.xibo3-https.tls.certresolver=le
- traefik.http.services.xibo3.loadbalancer.server.port=80
placement:
constraints:
- node.labels.xibo_3_web==true
resources:
limits:
memory: 1g
xibo3-quickchart:
image: ianw/quickchart
networks:
- xibo3-net
networks:
xibo3-net:
driver: overlay
traefik-net:
external: true
And traefik docker file :
version: '3.3'
services:
traefik:
image: traefik:v2.9.6
ports:
- 80:80
- 443:443
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.docker.network=traefik-net
# Redirect http to https
- traefik.http.routers.http.entrypoints=http
- traefik.http.routers.http.rule=HostRegexp(`{host:.+}`)
- traefik.http.routers.http.middlewares=redirect-to-https
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.traefik-dashboard-https.entrypoints=https
- traefik.http.routers.traefik-dashboard-https.tls=true
- traefik.http.routers.traefik-dashboard-https.rule=Host(`srv-poc.domain.local`) && (PathPrefix(`/traefik/`)
- traefik.http.routers.traefik-dashboard-https.middlewares=traefik-stripprefix
- traefik.http.middlewares.traefik-stripprefix.stripprefix.prefixes=/traefik
- traefik.http.routers.traefik-dashboard-https.service=api@internal
- traefik.http.services.traefik-dashboard.loadbalancer.server.port=8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- traefik-certs:/certificates
- traefik-logs:/var/log
command:
- --providers.docker
- --providers.docker.constraints=Label(`traefik.constraint-label`, `pst-traefik`)
- --providers.docker.exposedbydefault=false
- --providers.docker.swarmmode
- --providers.docker.network=traefik-net
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
- --entrypoints.xibo-xmr.address=:9505
- --certificatesresolvers.le.acme.email=(`email@domain.com`)
- --certificatesresolvers.le.acme.storage=/certificates/acme.json
- --certificatesresolvers.le.acme.tlschallenge=true
- --api
- --api.dashboard
- --accesslog
- --accesslog.filepath=/var/log/traefik-access.log
- --log
- --log.level=INFO
- --log.filepath=/var/log/traefik.log
networks:
- traefik-net
volumes:
traefik-certs:
traefik-logs:
networks:
traefik-net:
external: true
DNS record created for xibo.domain.local and xibo-xmr.domain.local to VM IP address where Traefik is located and display profiles configured to XMR = xibo-xmr.domain.local:9505
I can access successfully to cms-web by https://xibo.domain.local
Now, I try to connect Windows Client to https://xibo.domain.local:
- On Xibo Display dashbord, Client appears but I get Traefik internal container IP (10.0.0.2), not Display IP (192.168.250.81) and appears on red status
- Client doesn’t start - blocked on Xibo logo. No information in the status window
- XMR status : Connected to tcp://xibo-xmr.domain.local:9505. Waiting for messages
- I get a lot of 404 error to traefik access log (only on GET method… Work with PUT method - it’s strange)
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=reportFaults HTTP/1.1" 200 514 "-" "-" 4208 "xibo3-https@docker" "http://10.0.21.72:80" 337ms
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=submitLog HTTP/1.1" 200 508 "-" "-" 4207 "xibo3-https@docker" "http://10.0.21.72:80" 384ms
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=submitScreenshot HTTP/1.1" 200 522 "-" "-" 4209 "xibo3-https@docker" "http://10.0.21.72:80" 392ms
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=schedule HTTP/1.1" 200 2013 "-" "-" 4210 "xibo3-https@docker" "http://10.0.21.72:80" 400ms
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=registerDisplay HTTP/1.1" 200 3301 "-" "-" 4211 "xibo3-https@docker" "http://10.0.21.72:80" 328ms
10.0.0.2 - - [05/Apr/2023:19:09:34 +0000] "POST /xmds.php?v=6&method=notifyStatus HTTP/1.1" 200 514 "-" "-" 4212 "xibo3-https@docker" "http://10.0.21.72:80" 314ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "POST /xmds.php?v=6&method=submitLog HTTP/1.1" 200 508 "-" "-" 4214 "xibo3-https@docker" "http://10.0.21.72:80" 369ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "POST /xmds.php?v=6&method=requiredFiles HTTP/1.1" 200 7857 "-" "-" 4213 "xibo3-https@docker" "http://10.0.21.72:80" 456ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=15 HTTP/1.1" 404 0 "-" "-" 4216 "xibo3-https@docker" "http://10.0.21.72:80" 257ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "POST /xmds.php?v=6&method=notifyStatus HTTP/1.1" 200 514 "-" "-" 4215 "xibo3-https@docker" "http://10.0.21.72:80" 353ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=5 HTTP/1.1" 404 0 "-" "-" 4217 "xibo3-https@docker" "http://10.0.21.72:80" 250ms
10.0.0.2 - - [05/Apr/2023:19:09:35 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=13 HTTP/1.1" 404 0 "-" "-" 4218 "xibo3-https@docker" "http://10.0.21.72:80" 247ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=9 HTTP/1.1" 404 0 "-" "-" 4219 "xibo3-https@docker" "http://10.0.21.72:80" 250ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=20 HTTP/1.1" 404 0 "-" "-" 4220 "xibo3-https@docker" "http://10.0.21.72:80" 254ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=11 HTTP/1.1" 404 0 "-" "-" 4222 "xibo3-https@docker" "http://10.0.21.72:80" 219ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "POST /xmds.php?v=6&method=mediaInventory HTTP/1.1" 200 518 "-" "-" 4221 "xibo3-https@docker" "http://10.0.21.72:80" 288ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=471 HTTP/1.1" 404 0 "-" "-" 4223 "xibo3-https@docker" "http://10.0.21.72:80" 190ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=473 HTTP/1.1" 404 0 "-" "-" 4224 "xibo3-https@docker" "http://10.0.21.72:80" 211ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=3 HTTP/1.1" 404 0 "-" "-" 4225 "xibo3-https@docker" "http://10.0.21.72:80" 209ms
10.0.0.2 - - [05/Apr/2023:19:09:36 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=7 HTTP/1.1" 404 0 "-" "-" 4226 "xibo3-https@docker" "http://10.0.21.72:80" 185ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=18 HTTP/1.1" 404 0 "-" "-" 4227 "xibo3-https@docker" "http://10.0.21.72:80" 161ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=16 HTTP/1.1" 404 0 "-" "-" 4228 "xibo3-https@docker" "http://10.0.21.72:80" 156ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=1 HTTP/1.1" 404 0 "-" "-" 4229 "xibo3-https@docker" "http://10.0.21.72:80" 158ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=12 HTTP/1.1" 404 0 "-" "-" 4230 "xibo3-https@docker" "http://10.0.21.72:80" 158ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=14 HTTP/1.1" 404 0 "-" "-" 4231 "xibo3-https@docker" "http://10.0.21.72:80" 152ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=474 HTTP/1.1" 404 0 "-" "-" 4232 "xibo3-https@docker" "http://10.0.21.72:80" 148ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=10 HTTP/1.1" 404 0 "-" "-" 4233 "xibo3-https@docker" "http://10.0.21.72:80" 126ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=472 HTTP/1.1" 404 0 "-" "-" 4234 "xibo3-https@docker" "http://10.0.21.72:80" 123ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=8 HTTP/1.1" 404 0 "-" "-" 4235 "xibo3-https@docker" "http://10.0.21.72:80" 111ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=470 HTTP/1.1" 404 0 "-" "-" 4236 "xibo3-https@docker" "http://10.0.21.72:80" 113ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=6 HTTP/1.1" 404 0 "-" "-" 4237 "xibo3-https@docker" "http://10.0.21.72:80" 112ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=19 HTTP/1.1" 404 0 "-" "-" 4238 "xibo3-https@docker" "http://10.0.21.72:80" 114ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=4 HTTP/1.1" 404 0 "-" "-" 4239 "xibo3-https@docker" "http://10.0.21.72:80" 113ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=17 HTTP/1.1" 404 0 "-" "-" 4240 "xibo3-https@docker" "http://10.0.21.72:80" 113ms
10.0.0.2 - - [05/Apr/2023:19:09:37 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=2 HTTP/1.1" 404 0 "-" "-" 4241 "xibo3-https@docker" "http://10.0.21.72:80" 117ms
10.0.0.2 - - [05/Apr/2023:19:09:38 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=L&itemId=71 HTTP/1.1" 404 0 "-" "-" 4242 "xibo3-https@docker" "http://10.0.21.72:80" 113ms
10.0.0.2 - - [05/Apr/2023:19:09:38 +0000] "GET /xmds.php?file=0f65f9897169968589af51ed22f0dc68&displayId=9&type=M&itemId=33 HTTP/1.1" 404 0 "-" "-" 4243 "xibo3-https@docker" "http://10.0.21.72:80" 109ms
10.0.0.2 - - [05/Apr/2023:19:10:17 +0000] "GET /clock?_=1680721397181 HTTP/2.0" 200 214 "-" "-" 4244 "xibo3-https@docker" "http://10.0.21.72:80" 582ms
Only one instance is started per container and other services like portnair, etc… work fine
Do you have any experience with docker swarm and traefik?