Getting Started

1. Log in to the Docker repository

1.1 Login to the Workscope Azure container repository and replace <DockerUser> and <DockerPassword> with the credentials provided to you by Workscope:

docker login -u <DockerUser> -p <DockerPassword> workscope.azurecr.io

1.2 Copy the `docker-compose.yml` file to a location running Docker and amend the file as per the below instructions.

2. Portal configuration

2.1 Replace the image location <PortalVersion> with the actual Portal version, for example, `2021.34.1`:

image: workscope.azurecr.io/portal-linux:<PortalVersion>

2.2 Set the database environment connection string by replacing <DBUser> with the DB user, and replacing <DBPassword> with the DB user password:

- ConnectionStrings__DefaultConnection=Server=sqldata;Initial Catalog=Workscope;Persist Security Info=False;User ID=<DBUser>;Password=<DBPassword>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;

2.3 Set the required logging level. Start off monitoring with log level `Information` and above, and then modify to `Warning` once you are comfortable with the running of the stack:

- Logger__MinimumLevel__Default=Information

2.4 Specify the listening port, typically you want to expose port 8080 to your users:

ports:

- "5000:5000"

HTML

3. Middleware configuration

3.1 Replace the image location <MiddlewareVersion> with the actual Portal version, for example, 2021.04.1:

image: workscope.azurecr.io/middleware-linux:<MiddlewareVersion>

3.2 Set the database environment connection string by replacing <DBUser> with the DB user, and replacing <DBPassword> with the DB user password:

- ConnectionStrings__DefaultConnection=Server=sqldata;Initial Catalog=Workscope;Persist Security Info=False;User ID=<DBUser>;Password=<DBPassword>;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;

Note, the connection string is the same as the Portal connection string.

3.3 Set the required logging level. Start off monitoring with log level `Information` and above, and then modify to `Warning` once you are comfortable with the running of the stack:

- Logger__MinimumLevel__Default=Information

3.4 Specify the listening port. Note, the Middleware does not expose a web front-end, and is therefore not necessary to expose the Middleware to ports 8080 or 8000:

ports:

- "5001:5001"

3.5 The Middleware uses Redis to cache data from the database. It is possible to turn off caching by modifying the lines:

- RedisCacheSettings__Enabled=true

- RedisCacheSettings__ConnectionString=redis

to:

- RedisCacheSettings__Enabled=false

# - RedisCacheSettings__ConnectionString=redis

It is highly recommended to have Redis caching enabled.

The Redis config can be amended to reflect a particular Redis version. Replace <RedisVersion> with the latest and stable version. In addition, the port can be changed, but it is suggested to use the standard Redis port of `6379`.

redis:

image: redis:<RedisVersion>

ports:

- "6379:6379

4. Database configuration - SQL Server

4.1 Finally we require a database source. Workscope currently only supports Microsoft SQL Server and ideally SQL Server 2019. In this example, SQL Server 2019 is running containerized, however, in practice, many companies will use a SQL Server instance running on their database server.

4.2 Change the SA (Admin) password and replace <Password> with the Admin password.

Note, you will require a valid license to use SQL Server. Ideally, leave the default port to 1433:

sqldata:

image: mcr.microsoft.com/mssql/server:2019-latest

environment:

- SA_PASSWORD=<Password>

- ACCEPT_EULA=Y

ports:

- "1433:1433"

4.3 If you use your own SQL Server instance, then be sure to modify the connection strings to both the Portal and Middleware to point to the correct server instance.

5. Starting the Docker stack

Once you have all required settings saved in the `docker-compose.yml` file, you can startup the stack by running the following on the command line:

docker-compose up