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.git
If
git
is not installed, then runsudo apt update
andsudo apt install git -y
to 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=80
See 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/certs
folder - The
myserver.mydomain.com.crt
certificate file under that folder - The
myserver.mydomain.com.key
private key file under that folder
To install the software, run the below script:
sudo ./install.sh
This 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
certs
folder in theflex_config
directory.
- The files should be named
certificate.pem
andprivatekey.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 -d
After 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_PORT
in.env
to 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_NGINX
flag fromfalse
totrue
in the.env
file.
USE_NGINX=true
- Provide a certificate and key file. These files should be placed in the
$CERT_PATH
folder that's configured in the.env
file. 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_DNS
in the.env
file to the domain name you want to use.
PUBLIC_DNS=your_domain_name
- Restart the application. The
restart_server
script will detect the USE_NGINX flag and start a new container running nginx.
sudo ./scripts/restart_server.sh
- Change the
USE_NGINX
flag fromfalse
totrue
in the.env
file.
USE_NGINX=true
- Change the
PUBLIC_DNS
in the.env
file to the domain name you want to use.
PUBLIC_DNS=your_domain_name
- Change the
CERT_EMAIL
in the.env
file to your email address.
CERT_EMAIL=your_email_address
- Change the
AUTO_MANAGE_CERTS
in the.env
file totrue
.
AUTO_MANAGE_CERTS=true
- Restart the application. The
restart_server
script 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.sh
The 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" [email protected]:~/flexit-docker-deploy
ssh -i /path/to/flexitserver-privatekey.pem [email protected]
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 -d
To view logs for the FlexIt Frontend:
docker logs <container_name>
To stop the application:
./scripts/stop_server.sh
To restart the application:
sudo ./scripts/restart_server.sh
- Ensure docker is running:
docker ps
- Review logs:
docker logs flexit-analytics