Deploy the Creatio .NET Core application server on Linux
Support for .NET Core 3.1 will be retired in Creatio version 8.0.9. We recommend moving to .NET 6 when updating Creatio to version 8.0.8.
Before you deploy the server, take the following steps:
- Prepare the Creatio setup files. Read more >>>
- Deploy the database server. Read more >>>
- Deploy the Creatio caching server (Redis). Read more >>>
- Modify the ConnectionStrings.config file. Read more >>>
Learn more about running a PostgreSQL server in Docker in the Docker documentation.
Method 1. Deploy Creatio .NET Core on Linux directly
To deploy the Creatio application server:
- Install .NET Core, a GDI+ compatible API for non-Windows operating systems, and development libraries and header files for GNU C. Read more >>>
- Run the Creatio application server. Read more >>>
Install .NET Core and other Creaito dependencies
-
Download the packages-microsoft-prod package:
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-
Log in as root:
sudo su
-
Install the downloaded package:
dpkg -i packages-microsoft-prod.deb
-
Update the package lists:
apt-get update
-
Install the APT transport for downloading via the HTTP Secure protocol:
apt-get install apt-transport-https
-
Update the package lists:
apt-get update
-
Install .NET Core:
apt-get install dotnet-sdk-3.1
-
Install a GDI+ compatible API for non-Windows operating systems:
apt-get install -y libgdiplus
-
Install development libraries and header files for GNU C:
apt-get install -y libc6-dev
-
Log out from your root session:
exit
Run the Creatio application server
If you are deploying the .NET Core development environment with access via HTTP, modify the Terrasoft.WebHost.dll.config file in the Creatio root directory before you run Creatio. Set the "add key" parameter to the following: <add key="CookiesSameSiteMode" value="Lax" />
.
This ensures correct operation both via HTTP and HTTPS. However, the mobile app will not be operational if you use this setting.
To run Creatio:
-
Open the directory that contains Creatio setup files:
cd /path/to/application/directory/
-
Run the .NET Core server:
COMPlus_ThreadPool_ForceMinWorkerThreads=100 dotnet Terrasoft.WebHost.dll
Creatio HTTP version will be available on port 5000.
Creatio HTTPS version will be available on port 5002.
To log in to newly deployed Creatio, use the default Supervisor user account. It is highly recommended to change the Supervisor password immediately. Login: Supervisor; password: Supervisor.
Method 2. Deploy Creatio .NET Core on Linux using Docker
Use this deployment method to run a compartmentalized Creatio application. We assume that you have installed the Redis sever, deployed the Creatio database, and set up the ConnectionStrings.config file using the instructions in the previous steps.
To deploy Creatio application server using Docker:
- Make Redis accessible from the Docker container. Read more >>>
- Install Docker. Read more >>>
- Create a Dockerfile. Read more >>>
- Build and run a Docker image. Read more >>>
We recommend deploying Creatio using Docker for development and testing environments only. Avoid using Docker for the production environment before we implement support for Creatio updates in Docker (planned for upcoming releases).
Configure the Creatio caching server (Redis)
-
Open redis.conf in a text editor as root. For example, use the Nano text editor:
sudo nano /etc/redis/redis.conf
-
Locate the "bind 127.0.0.1 ::1" entry. Replace the entry with "bind 0.0.0.0" to listen to all available IPV4 interfaces.
-
Save changes and exit the editor.
-
Restart the Redis server:
sudo systemctl restart redis-server
Install Docker
To install Docker, run:
sudo apt-get install docker
Create a Dockerfile
/path/to/application/directory/ is the directory that contains unpacked Creatio installation files.
-
Open the Creatio directory:
cd **/path/to/application/directory/**
-
Create a Dockerfile using a text editor. For example, use the Nano text editor:
nano Dockerfile
-
Insert the following code:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS base
EXPOSE 5000 5002
RUN apt-get update && \
apt-get -y --no-install-recommends install \
libgdiplus \
libc6-dev && \
apt-get clean all && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
WORKDIR /app
COPY . ./
FROM base AS final
WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT Development
ENV TZ US/Eastern
ENV COMPlus_ThreadPool_ForceMinWorkerThreads 100
ENTRYPOINT ["dotnet", "Terrasoft.WebHost.dll"] -
Press Ctrl+O to save the changes.
-
Press Ctrl+X to exit the editor.
Build and run a Docker image
If you are deploying the .NET Core development environment with access via HTTP, modify the Terrasoft.WebHost.dll.config file in the Creatio root directory before you run the Docker image. Set the "add key" parameter to the following: <add key="CookiesSameSiteMode" value="Lax" />
.
This ensures correct operation both via HTTP and HTTPS. However, the mobile app will not be operational if you use this setting.
Build a Docker image:
docker build -f Dockerfile -t creatioimg .
Run the docker image:
docker run -p http_port_number:5000 -p https_port_number:5002 -d --dns=DNS_server_ip --dns-search=DNS_address_suffix -v /logspath/mycreatio:/app/Logs --name Creatio creatioimg
http_port_number is a port number. Docker will serve the HTTP version on this port
https_port_number is a port number. Docker will serve the HTTPS version on this port
DNS_server_ip is the IP address of a DNS server that enables the container to resolve Internet domains. You can use multiple --dns flags for multiple DNS servers.
DNS_address_suffix is a DNS search domain that enables the container to search for non-fully-qualified hostnames. You can use multiple --dns-search flags for multiple DNS search domains.
Add the --restart=always flag to the command make a persistent Docker container.
Creatio HTTP version will be available on port http_port_number.
Creatio HTTPS version will be available on port https_port_number.
To log in to a newly deployed application, use the default Supervisor user account. It is highly recommended to change the Supervisor password immediately. Login: Supervisor; password: Supervisor.
Configure Creatio .NET Core for HTTPS
Before you start working in Creatio via HTTPS, take the following steps:
-
Obtain a *.pfx digital certificate from the certification center.
noteIf you use a self-signed certificate, Creatio mobile application cannot connect to the Creatio website due to security policies of mobile applications.
-
Go to Creatio root directory and open appsettings.json.
-
Specify your website address, path to the certificate, and certificate password in the "Https" block.
"Https": {
"Url": "https://::5002",
"Certificate": {
"Path": "C:\Projects\site\20210215_103239\localhost.pfx",
"Password": "Password"
}
}
You can specify both relative and absolute path to the certificate. The absolute path must be JSON compatible.