Moving from Windows to Docker
This guide moves an existing Windows service installation of Analytics Data Processing and Analytics API to the Docker installation. You keep the same Analytics database, and the settings from your Windows installation are reused.
1. Install Docker and prepare the folder
Follow steps 1 and 2 in Docker Installation: install Docker, log in to the image registry, and create the ewa_analytics folder with docker-compose.ewa_analytics.yml and the logs folder.
2. Copy your settings
Your Windows settings are in the .env file next to each .exe file.
.env.data_processing: copy the settings from the Analytics Data Processing .env. The names are the same. Then:
- If you set
DATABASE__ENCRYPTorDATABASE__TRUST_SERVER_CERTIFICATE, set the same values asSOURCE__DATABASE__ENCRYPT,TARGET__DATABASE__ENCRYPT,SOURCE__DATABASE__TRUST_SERVER_CERTIFICATEandTARGET__DATABASE__TRUST_SERVER_CERTIFICATEinstead. - Moving to Docker needs a full load and transform: set
BLIKSUND_LOAD_FULL_ON_START=trueandBLIKSUND_TRANSFORM_FULL_ON_START=true, see Full load and transform.
.env.api: copy the DATABASE__* and AUTHENTICATION__* settings from the Analytics API .env. Then:
- Keep
APP__ROOT_PATHif it is set, so that existing URLs keep working. - Leave out the
LOGGING__*lines. See the configuration reference for your version for the log settings.
Check both files against the configuration reference for your versions, and read the release notes for every version after your Windows version (see Upgrading), for example Analytics Data Processing v2.6.0 and Analytics API v1.4.13.
3. Stop the Windows services
Stop both Windows services before starting Docker, so that two installations never write to the Analytics database at the same time.
In a terminal (for example PowerShell) in administrator mode, from the folder of each .exe file:
.\analytics_dp_service.exe stop
.\analytics_api_service.exe stop
4. Start the Docker installation
From the ewa_analytics folder:
docker compose -f docker-compose.ewa_analytics.yml up -d
Then follow Full load and transform from step 3, with the commands in Restarting. When both services have restarted, check that EWA Insight and your integrations work, see How to use the API.
5. Remove the Windows services
When everything works, remove the Windows services. In a terminal in administrator mode:
nssm remove BliksundAnalyticsDP confirm
nssm remove "Bliksund Analytics API Service" confirm
You can then delete the Windows installation folders.
To go back to Windows instead, stop Docker with docker compose -f docker-compose.ewa_analytics.yml down and start the Windows services again with .\analytics_dp_service.exe start and .\analytics_api_service.exe start. If the Windows version is older than the Docker version, set BLIKSUND_TRANSFORM_FULL_ON_START=true for its first run, since the tables were rebuilt by the newer version.