While attempting to upgrade Xibo (Docker) to the latest version I discovered that running docker-compose down and then docker-compose up appears to reset the database. I am running the Docker Toolbox on Server 2012 R2 and the database is being saved in the \shared\db folder on the local computer so not sure why its being reset after the docker-compose up command?
With Docker Toolbox, you wouldn’t expect to loose content on a restart as you do on Docker For Windows.
Try downing all containers, closing the Toolbox console, deleting the Docker virtual machine (normally called default
) inside Virtual Box, and then re-opening the Toolbox console and upping the containers again.
That will force a full rebuild of the VM. You’ll need to re-add your NAT forwarding rules to the VM too (see the manual for details).
I am also having this issue.
I am currently running Windows Server 2012 R2, and am using Virtualbox version 6.0.0, and am running Docker Toolbox version 18.09.3. I have other applications running through virtualbox VM’s without issue.
I installed Xibo 2.0.3 using docker-compose up -d, and have shared folders through virtualbox - c:\Users\techedge\Xibo\shared
The install occurred from this path:
C:\Users\techedge\Xibo
When the containers are up, I can log in to Xibo. I logged in, changed the password, created two campaigns, uploaded some media files, and added a layout. I can log out of Xibo then exit the browser, and can log back in using the changed password, and everything is still there.
I have tested using docker-compose stop followed by docker-compose start and the content is still there, along with the correct password.
I have also tested using docker-compose stop to stop running containers, then performed a docker-machine stop followed by a docker-machine start command, then manually bringing up the DB container first, followed by the CMS container and the XMR container. The content is not present following this sequence, including campaigns, media, and layouts - everything has been reset, and the password defaulted.
I tested by performing a system reboot, both planned first by stopping containers then rebooting the host, and also one that was unplanned - simulating a power loss to the host - in both cases, content is lost, including campaigns, media, and layouts.
As far as the shared folders, I see that the following path was created:
*** C:\Users\techedge\Xibo\Shared\var\lib\mysql\mysql - however, nothing exists in that directory.
*** C:\Users\techedge\Xibo\Shared\var\lib\mysql - I see ib_logfile1, ib_logfile101, and ibdata listed here, but not with a current date.
*** C:\Users\techedge\Xibo\Shared\var\www\cms\custom - I see a settings-custom.php listed, but not with a current date.
*** C:\Users\techedge\Xibo\Shared\var\www\cms\library\cache - various GUID sub-folders created.
*** C:\Users\techedge\Xibo\Shared\var\www\cms\library - various folders created, including cache, screenshots, temp, widget, and a file - 3.xlf
Other folders are created, but nothing is present in those folders.
Here is the docker-compose.yml file used:
version: “2.1”
services:
cms-db:
image: mysql:5.6
volumes:
- “./shared/db:/var/lib/mysql”
environment:
- MYSQL_DATABASE=cms
- MYSQL_USER=cms
- MYSQL_RANDOM_ROOT_PASSWORD=yes
mem_limit: 1g
env_file: config.env
cms-xmr:
image: xibosignage/xibo-xmr:release-0.7
ports:
- “9505:9505”
mem_limit: 256m
env_file: config.env
cms-web:
image: xibosignage/xibo-cms:release-2.0.3
volumes:
- “./shared/cms/custom:/var/www/cms/custom”
- “./shared/backup:/var/www/backup”
- “./shared/cms/web/theme/custom:/var/www/cms/web/theme/custom”
- “./shared/cms/library:/var/www/cms/library”
- “./shared/cms/web/userscripts:/var/www/cms/web/userscripts”
links:
- cms-db:mysql
- cms-xmr:50001
environment:
- XMR_HOST=cms-xmr
env_file: config.env
ports:
- “80:80”
mem_limit: 1g
I did generate a config.env that has a database password in it, as well as some additional settings for email SMTP server, including user, host and password. I can provide that if necessary.
I really need to get this content to persist, and would appreciate any support available.