This repository provides everything needed to deploy FlexIt using Docker. FlexIt is a highly powerful and flexible business intelligence and data transformation tool.
On your linux server, clone this repository to your selected folder:
git clone https://github.com/flexanalytics/flexit-docker-linux.gitIf
gitis not installed, then runsudo apt updateandsudo apt install git -yto install git, then retry the clone.
The repo's .env file defines project-level variables. Should you need to update ports or install versions, you can edit them there. Otherwise keep the defaults.
## -- frontend app setup -- ##
FLEXIT_PORT=3030
FLEXIT_VERSION=latest
## -- backend db setup -- ##
CONTENT_DB_VERSION=latest
DB_PORT=5432
## -- Optional nginx setup -- ##
USE_NGINX=false
CERT_PATH=/etc/nginx/certs
PUBLIC_DNS=myserver.mydomain.com
NGINX_HTTPS_PORT=443
NGINX_HTTP_PORT=80See the Configure SSL section below for details on how to enable HTTPS/SSL. The above configuration uses the Nginx with your certs configuration, which would require you to set USE_NGINX=true and then the following:
- The
/etc/nginx/certsfolder - The
myserver.mydomain.com.crtcertificate file under that folder - The
myserver.mydomain.com.keyprivate key file under that folder
To install the software, run the below script:
sudo ./install.shThis will install the needed software and allow you to configure the backend credentials.
The application will automatically start after this script is complete. You may need to reboot the server if docker was not previously installed.
Visit the application at:
- First Install:
http://localhost:<FLEXIT_PORT> - After Optionally Configuring SSL:
https://DNS_NAME
There are 2 ways to configure SSL for the application:
- Provide a certificate and key file. These files should be placed in a
certsfolder in theflex_configdirectory.
- The files should be named
certificate.pemandprivatekey.pem.
Note
You will have to restart the application after adding the certificate and key files.
sudo ./scripts/restart_server.sh
# or
docker compose down
docker compose up -dAfter restarting the server, an administrator can navigate to Configuration > Server Settings and add the Host Name, as well as change the port to 443 and enable ssl.
- Update the
FLEXIT_PORTin.envto use port 443.
## -- frontend app setup -- ##
FLEXIT_PORT=443- Restart the application again.
sudo ./scripts/restart_server.sh
# or
docker compose down
docker compose up -d- Access the application at
https://<dns_name_in_settings>.
- Change the
USE_NGINXflag fromfalsetotruein the.envfile.
USE_NGINX=true- Provide a certificate and key file. These files should be placed in the
$CERT_PATHfolder that's configured in the.envfile. If you're not sure where to put the certs folder, you can put them in/etc/nginx/certs, which may need to be created with thesudo mkdir -p /etc/nginx/certs/command.
Note
The certificate and key files will need to have the naming convention of PUBLIC_DNS.crt and PUBLIC_DNS.key i.e. flexit.myserver.com.crt.
More information can be found in the nginx proxy containers documentation here
- Change the
PUBLIC_DNSin the.envfile to the domain name you want to use.
PUBLIC_DNS=your_domain_name- Restart the application. The
restart_serverscript will detect the USE_NGINX flag and start a new container running nginx.
sudo ./scripts/restart_server.sh- Change the
USE_NGINXflag fromfalsetotruein the.envfile.
USE_NGINX=true- Change the
PUBLIC_DNSin the.envfile to the domain name you want to use.
PUBLIC_DNS=your_domain_name- Change the
CERT_EMAILin the.envfile to your email address.
CERT_EMAIL=your_email_address- Change the
AUTO_MANAGE_CERTSin the.envfile totrue.
AUTO_MANAGE_CERTS=true- Restart the application. The
restart_serverscript will detect the USE_NGINX and AUTO_MANAGE_CERTS flags and start a new container running nginx and the companion container.
sudo ./scripts/restart_server.shThe standard deployment pulls versions from the repo to deploy standard versions of FlexIt. If a patch is issued and you need to apply a non-standard FlexIt version, then you can follow these instructions to build the new image:
scp -i /path/to/flexitserver-privatekey.pem "/path/to/flexit/install/installers/flexit-linux-x64-installer.run" ubuntu@1.1.1.1:~/flexit-docker-deploy
ssh -i /path/to/flexitserver-privatekey.pem ubuntu@1.1.1.1
cd flexit-docker-deploy
sudo docker compose down
sudo docker rmi $(sudo docker images -q) #removes all docker images to clear up space
sudo docker compose build
sudo docker compose up --pull missing -dTo view logs for the FlexIt Frontend:
docker logs <container_name>To stop the application:
./scripts/stop_server.shTo restart the application:
sudo ./scripts/restart_server.sh- Ensure docker is running:
docker ps
- Review logs:
docker logs flexit-analytics

