With Litium 8 we introduce a new way to extend the Litium platform. Add-ons will be able to run as separate applications, called Litium apps.
The Litium apps are stand-alone applications and will communicate with Litium through our Litium connect APIs. This gives greater flexibility and scalability to the Litium platform.
Litium apps need to be installed per customer project. Please note that Litium support installs and upgrades the apps, you cannot do it yourself in a test-and production environment.
Litium apps contain the external app, like payment or shipment providers for a specific customer, and are needed to be able to place orders. Different customers need different apps connected so the definition of a customer may not be equal to the next customer. The definition will be described with the docker-compose format to easily start and stop different environments.
For each app, you can find the docker-compose template that you need to merge with the docker-compose file that you have for the specific customer, the docker-compose for the customer should be kept with the source of the application to make it look the same for all developers in the project.
Before starting you need to ensure that you have the following installed:
Remember that you can't use localhost as the domain name and you need to use the one that is set up in the previous steps.
Certificate
All communication between Litium and the Litium App needs to be using https, to make this work without certificate warnings the developer certificate that previously was created will be used.
Use the following command to export the existing developer certificate. Remember to use your own password instead of SuperSecretPassword.
dotnet dev-certs https -ep ./data/https/localhost.pfx -p SuperSecretPassword
The data folder that was created should be ignored from version control, that folder contains developer-specific files.
Docker-compose
To be able to use a docker-compose file for the customer but with developer-specific settings; docker-compose supports environment variables and environment file (".env").
Create a new file with the name ".env" if that not exist with the following content. Remember to use your own password, the one you were using during certificate export. This file should be ignored from version control.
CERT_PWD=SuperSecretPassword
Create a new empty file with the name "docker-compose.yaml", skip if the file already exists. From the Litium App-specific pages that exist in the menu, you can find the docker-compose template that is needed for the respective app. Copy the docker-compose template and merge that content with your customer-specific docker-compose.yaml file. Remember to replace the information in the template that is relevant for each app.
Start the Litium apps with the following command
docker-compose up
If the content in docker-compose.yaml is correct the services will be created; otherwise, correct errors and try to start again. When all services are started you need to browse each app's URL, this will trigger the app to be visible inside customers' Litium installation.