Docker
Device Requirements (Docker)
Being a containerized application, GalixiHub will run on any system that has git, Docker and Docker Compose installed. To check if git is supported, run the following
git --version
If the response is command not found, run the following
sudo apt update
sudo apt install git -y
To check if Docker is installed, run the following
sudo docker --version
If the response is command not found, run the following
sudo apt update
sudo apt install docker.io -y
To check if Docker Compose is installed, run the following
sudo docker compose version
If the response is ‘compose’ is not a docker command, run the following
sudo apt update
sudo apt install docker-compose-plugin -y
Download GalixiHub Compose Infrastructure
The Docker Compose packages for GalixiHub is available via Git Hub and may be cloned from there. It is free to use, and does not require a subscription or payment of any kind. To clone the GalixiHub Git Hub repository, do the following
git clone https://github.com/GalixsysNetworks/galixihub-compose.git
GalixiHub Licensing (Docker)
There are two licenses used for the complete Docker Compose offering of GalixiHub. First, the Docker Compose files themselves, as part of the Git Hub download, are all under the BSD V2 license. There is no need to accept this license and allows the user to modify the source code as per the terms of the BSD V2 license. The docker image part of GalixiHub, however, is under a proprietary license and must be accepted as part of the install. This image is automatically downloaded from Docker Hub during the install process and not bundled directly as part of the Git Hub download. How the license is accepted is explained in the Install GalixiHub section below.
Install GalixiHub (Docker)
The git clone operation will create a directory named galixihub-compose in the directory that the git clone operation was performed in.
Create World Compose Directory:
Create a directory that the World will be created in, and copy over the Compose in the galixihub-compose clone operation
cp -r galixihub-compose galixihub-<worldname>
cd galixihub-<worldname>
Configure Initial World State:
IMPORTANT: Modify the galixihub-<worldname> galixihub.env to meet the world parameters. Each parameter is described below
1. GALIXIHUB_ACCEPT_LICENSE. Delete “NO” and type in “YES” to accept the license for GalixiHub Docker image. Note that even though the compose files are under BSD V2, the galixihub Docker image is under a proprietary license. The license can be found at GalixiHub Terms and Conditions
2. GALIXIHUB_WORLD_NAME Enter the name of the world here. Note that once set, the world name CANNOT be changed.
3. GALIXIHUB_HOSTNAME Enter either the public IP address, or (preferred) a domain name here. It is strongly recommended to get a domain name for the world as if the ISP changes the public IP address, the world will be un-accessible.
4. GALIXIHUB_PORT The network port that the world uses. Note that the ports used by GalixiHub will be the number entered here plus the next one (so if 50500 is used, GalixiHub will use both 50500 and 50501). These ports must be forwarded via any gateway used on a physical network.
5. GALIXIHUB_OWNER_CODE The initial code used to connect to this world as the Owner. Once the world is setup, the world must be connected to by the owner’s device running GalixiCom, and set as an Owner in order to manage this site. No local management is available (only owner reset; see below). Once connected to, it is strongly recommended to change the owner code via GalixiCom, and to disable the ability for any other device to join as an Owner.
Initialize and Start World
Make sure both galixistart.sh and galixistop.sh are executable in galixihub-<worldname>
chmod a+x *.sh
Launch galixistart.sh
sudo ./galixistart.sh
If this is the first time starting GalixiHub, both the galixihub and mariadb images will be pulled from Docker Hub and started. After a few seconds, the “GalixiHub stack started successfully” message should appear. Once running, connect to the newly created world with a device running GalixiCom to join as an owner, and configure the rest of the world (world avatar image, description, etc.) using the GalixiCom Remote Management interfaces (see below).
Stop and Remove World
To stop the GalixiHub container, run the following from the galixihub-<worldname> directory
sudo ./galixistop.sh
This will shutdown the GalixiHub container, but retain all the data. To fully remove the world, run the following:
sudo ./galixistop.sh -r
The galixistop.sh script will ask for confirmation to delete the entire world (including all data). Type YES to do the full delete.
Remote Management (Docker)
In order to manage the world properties created by GalixiHub, the Owner of the world must connect to that world (ideally as the first user to join the world) via the GalixiCom app (which must be subscribed to, see the details for Android Subscriptions or iOS Subscriptions) as an Owner. This is critical and done via entering the owner code (as setup in step 5 above) in the “Access Code” field of the Android Join World or iOS Join World screen in GalixiCom.
Once connected as an Owner, additional menus appear on the Android Existing Chats or iOS Existing Chats screen to aid in the management of the world (such as changing the world avatar icon or image, descriptions of the world, etc.), with additional types of messaging options available (such as sending Announcements (q.v.)). Options to manage the world include Android World Information and iOS World Information, Android Modify World and iOS Modify World, Android Member Management and iOS Member Management, and Android Modify Member and iOS Modify Member.
Reset Owner (Docker)
All remote operation functions are expected to be done by the owner’s device through GalixiCom, connected to the world as an Owner. The only capability the Docker version of GalixiHub has is to reset the Owner state via the following commands below. Note that this commands are run inside the Docker container (from the directory the World was created in)
Owner Status. Displays the Owner status state, and code to join
sudo docker exec -it --user root galixihub galixihub-admin owner-status
Enable Owner. Enables a device to join as an Owner
sudo docker exec -it --user root galixihub galixihub-admin owner-enable
Disable Owner. Does not allow devices to join as an Owner (only as a Member (q.v.))
sudo docker exec -it --user root galixihub galixihub-admin owner-disable
Reset Owner. Enables a device to join as an Owner, with the code being what is passed on the command line (numeric between 6-12 digits).
sudo docker exec -it --user root galixihub galixihub-admin reset-owner <code>
Filesystem Layout (Docker)
In order to view the GalixiHub container file system, perform the following inside the world directory:
sudo docker exec -it galixihub bash
This will pull up a bash shell inside the container. The GalixiHub file structure is as follows
/
├── opt/
│ └── galixihub/
│ └── galixihub.jar
├── var/
│ ├── lib/
│ │ └── galixihub/
│ │ ├── AvatarPhotos/
│ │ ├── Images/
│ │ └── Messages/
│ └── log/
│ └── galixihub/
├── etc/
│ └── galixihub/
│ └── galixihub.env
└── usr/
└── sbin/
└── galixihub-admin
Filesystem Details (Docker)
/opt/galixihub/Application directory containing
galixihub.jar./var/lib/galixihub/AvatarPhotos/User avatar storage.
/var/lib/galixihub/Images/Uploaded images.
/var/lib/galixihub/Messages/Stored messages.
/var/log/galixihub/Application log files, including error logs.
/etc/galixihub/Configuration directory containing
galixihub.env. Note this file is copied over from the Composegalixihub.envthat is modified above to set the world initial states. Modifying this file in the container has no effect./usr/sbin/galixihub-adminAdministrative CLI utility.
Multiple Worlds on a Single Machine
One of the main advantages of using a containerized solution is the ability to run multiple instances of the application on the same machine. In this regard, the Docker version of GalixiHub is no different. In fact, given the relatively small footprint in both CPU usage, memory usage, and data storage, multiple instances of GalixiHub is well suited to be run on even entry-level server class machines. In order to create multiple Worlds, simply make multiple copies of the docker-compose infrastructure into new directories, and configure, launch, etc., from each world’s directory.
Remove GalixiHub (Docker)
To fully remove GalixiHub, first shutdown and remove all World containers. To do so, run the following in each directory for each world created:
sudo ./galixistop.sh -r
Next, remove the galixihub docker image itself
sudo docker rmi galixsysnetworks/galixihub
Finally, remove all created world directories, and their contents, along with the docker-compose directory created from the clone from Git Hub
rm -R galixihub-<worldname>
rm -R galixihub-compose