Set up an on-premise container
Purpose
This page describes the recommended approach for running BE-Code as an on-premise installation on a Windows server with Docker Compose.
Prerequisites
- Windows Server build 22H2 or later with at least 1 CPU core, 1 GB RAM, and 10 GB of free disk space.
- Installed and configured Docker Engine and Docker Compose.
- Access to the BE-terna Azure Container Registry
becode.azurecr.io; authentication uses ACR tokens, one token per customer. - A valid SSL certificate as
cert.pfxin a host directory (for exampleC:\certs).
Recommended order
- Create an application folder, for example
C:\be.code. - Create the files
docker-compose.ymland.envin that folder. - Fill in
docker-compose.yml. - Fill in
.envand set passwords. - Start the container and verify availability.
Setup building blocks
Maintain the Docker Compose file
In the application folder, create docker-compose.yml with the following content:
services:
becode:
image: becode.azurecr.io/becode:latest
container_name: becode
restart: always
expose:
- "1880"
ports:
- "1880:1880"
volumes:
- C:\certs:C:\certs
env_file:
- .env
The path before the colon in the volumes entry points to the host directory that holds the cert.pfx file.
Set environment variables in the .env file
Create the file .env in the same folder. The certificate file must be named exactly cert.pfx. Replace userPw with a strong password:
title="BE-terna"
port="1880"
flowfile="C:\\data\\flow.json"
settingsfile="C:\\data\\settings.js"
userPw=""
certificateName="C:\certs\cert.pfx"
certificatePw=""
Start the container
Open a terminal in the application folder and start the container:
docker compose up -d
After startup, BE-Code is available at https://<hostname>:1880/becode. Use the same URL in the BE-Code setup in Business Central.
Process Operational notes Key points for running the on-premise installation securely.
- Use an individual password in the
.envfile; the default demo password is only intended for testing. - Protect the
.envfile and the certificate against unauthorized access. - Keep the image up to date and plan a maintenance window for
docker compose pulland restart. - Verify availability after each restart using the Check connection action in Business Central.
Links