Need some advice on my software development mixed with xibo

Hi all,

I need some advices on building kiosk solution with xibo. Below diagram shows the current design of the kiosk solution.

[Source of the diagram]

Background of the solution:

  • I would like to run the xibo software with my laravel cms solution
  • I would like to run the server side solution with docker + docker-compose
  • Instead of having a Apache as a reverse proxy, and 2 standalone docker services (xibo, and my laravel), I would like to running 1 apache, and serves 2 cms (laravel, and xibo) into same docker image
  • I would like to run with php7.4
  • I would like to run xibo 3.0 for the interactive support on kiosk device

Since I have built some applications on laravel already, I would like to mix both cms, and laravel into same docker image. Before I start the mixation, I would like to get some advices regarding on this issue.

  • Does xibo support php7.4? According to this post, 7.4 should be supported in 3.0. Is is true?
  • Are there any reasons for building xibo in alpine instead of other linux distro? According to this post, the alpine one does not support 7.4 yet
  • I would like to follow this guide to build the part on xibo. Any more recommendation guide for me to build up the Dockerfile?

Any helps would be appreciated. Thanks

Best practise is that you have one service per container. If you package your application in to its own container, then you can have exactly the environment you want without needing to be concerned about the environment Xibo needs. That would be my suggestion.

Thanks for the advices.

If I encapsulate the service as the link posted in my original thread, the architecture will like below

Apache (Host environment)
|
|- (Apache / xibo_cms) (Docker container 1)
|
|- (Apache / laravel_cms) (Docker container 2)

There will be 3 apaches in this solution. Am I understanding correctly? Is it good for running the architecture in this way? IMO, isn’t it strange for running 3 apaches in this manner?

Your Host apache should direct traffic to the correct backend container. Xibo shouldn’t be forwarding traffic to your laravel container for you.

Assuming so, then that’s exactly how containerised services are designed to work.

Yes. The Apache in the host environment will be responsible for routing traffic to the correct backend container. I guess I will adopt your solution as discussed.

Do you have any suggestions for sharing data between 2 containers (xibo, and laravel)? For example, if xibo saves new images, I would like laravel to keep records (the path to the images such that the web application in kiosk can access).

Let’s say the apache setup likes following

DOMAIN/
DOMAIN/xibo/                           # Direct to xibo cms with ALIAS in xibo config
DOMAIN/laravel/api/                 # Direct to laravel cms api only
DOMAIN/static/xxx/yyy.json      # Some index json managed by laravel cms

Currently, I plan to extend the xibo cms ui such that it will send a request with those images path etc stuff via the laravel’s API after completing the original application. Or, even a new ui for filling in my business own login data (shop name, opening hours etc)

POST /laravel/api/shop

...
icon=/xibo/cms/library/27.png
menu1=/xibo/cms/library/30.png
name=abc
opening=0900-1800
....
  • Both containers are running into same domain, so /laravel/api/shop/
  • Assume /xibo/cms/library/ is able to access static file assets after uploading via xibo UI
  • Those data will be written in to yyy.json by laravel cms

In Kiosk web applications, after fetching the yyy.json, it will download the assets from xibo as written in yyy.json

Is it a good approach for doing so? Any better suggestions?

2ndly, I see xibo is running with memcached. Are there any manuals for me to extend to react on certain events from memcached? Actually, I see memcached as kind of a redis, which the application can react on changes in certain keys. I am thinking about whether it is possible for me to write something from laravel to memcached in order to instruct the xibo cms to do something else or vice versa.

Any ideas will be appreciated.

I’m sorry I can’t offer you advice on developing your own application.

What I would say is that you should keep all your interactions with Xibo via the API and via XMDS. You shouldn’t try and directly access files in the CMS library, or the CMS database.

OK… Are there any websites for me to checkout the APIs?

I have go thorough contents https://xibo.org.uk/docs/developer/ but I cannot find the APIs, and usage on XMDS.

Can you point me some resources to study especially the image file accessing stuff?

Thanks

Edited:

https://xibo.org.uk/docs/developer/cms-api

Describes the API and has a link to the reference. It’s on the page you linked.

oops. Thanks. I guess I have sufficient information to start my work.