WebReports Setup for Docker
Trouble viewing images? Click on images to enlarge.
This article will walk you through the process of standing up a WebReports Docker Container. In this example we are using the Docker Desktop for Windows., but the same steps apply for Docker running in Linux environments.
Requirements and Network Topology
For more information on the System Requirements and Network Topology, please read this article.
A Microsoft SQL or MySQL (version 8 or higher) Database is required for the WebReports application. If you already have a Microsoft SQL Server / MySQL Database running, you can skip the Docker Container Setup steps below.
A valid certificate is required for the WebReports application to run. In the example below we are referencing a .pfx file, which is called when starting the Docker Image. Please see your system documentation for creating a valid certificate/pfx file.
Microsoft SQL / MySQL Server Database Docker Container Setup
1. Open Windows PowerShell
2. Modify then execute the following command to Install MS SQL / MySQL.
NOTE: The password is being set in this command, please change the orange text in the command to your desired password.
MS SQL Command:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD==My!S3cr3tPassw@rd
" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
MySQL:
docker run --name WebReportsMySQL -e MYSQL_ROOT_PASSWORD=My!S3cr3tPassw@rd -d mysql:latest
3. Wait for the install to finish.
4. Execute the following command.
docker ps
5. Copy your CONTAINER ID.
6. Modify then execute the following command after replacing the text in orange with your copied CONTAINER ID from step 8.
docker inspect 4655319a9523
7. Copy the IPAddress. This IP address will be used in the "DefaultConnection" section of the appsettings.json file.
WebReports Docker Image Setup
1. Run the following command, in Power Shell, to download the WebReports application.
docker pull bridgeworks/bridgeworksreportsweb
2. Wait for the download process to complete.
3. To start up the BridgeWorksWR Docker image, run the following command in Power Shell.
It's important to replace SECRETPASSWORD with the password to your pfx file. The command below references aspnetapp.pfx. If your pfx file has a different name, please change the file name in the command to reflect your environment.
Please note: You MUST have a valid pfx file in your %USERPROFILE%\.aspnet\https directory.
docker run --name BridgeWorksWR -p 443:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=443 -e ASPNETCORE_Kestrel__Certificates__Default__Password="SECRETPASSWORD" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx -v $env:USERPROFILE\.aspnet\https:/https/ --dns=8.8.8.8 -td bridgeworks/bridgeworksreportsweb:latest
4. Execute the following command to download the default appsettings.json file to the c:\temp directory (verify the c:\temp directory exists on your system or choose an alternate path).
docker cp BridgeWorksWR:/app/appsettings.json c:\temp
5. Edit the appsettings.json file with a text editor, and update DefaultConnection string, the LicenseKey and CompanyID. All three are required for the docker container to start properly. Save the file.
IPAddress - The IP address of your Microsoft SQL Server Instance.
User ID - The username to your Microsoft SQL Server Instance.
Password - The password to your Microsoft SQL Server Instance.
Using Microsoft SQL Server
- Make sure the Microsoft SQL default connection is not commented out ( // ) and that the MySQL connection is commented out with //.
- Server (Found at step 2 - Configure Your Microsoft SQL Server Instance In SSMS)
- Instance Name (Found at step 7 - Microsoft SQL Express 2019 SSMS Installation)
- Database (Found at step 9 - Configure Your Microsoft SQL Server Instance In SSMS)
- User ID (Found at step 11 - Configure Your Microsoft SQL Server Instance In SSMS)
- Password (Found at step 13 - Configure Your Microsoft SQL Server Instance In SSMS)
- Set the database type to MSSQL
Example Connection String for MSSQL: "DefaultConnection": "Server=172.17.0.2,1433;Database=WebReports;User Id=sa;Password=secretpassword;Encrypt=Yes;TrustServerCertificate=Yes;Connect Timeout=60"
Using MySQL
- Make sure the MySQL default connection is not commented out ( // ) and that the Microsoft SQL connection is.
- Server (Name / IP address of the server hosting MySQL)
- Port (Set at step 8 - Installing MySQL)
- Database (Set the name of your WebReports database here - Default can just use WebReports)
- User ID (Set at step 11 - Installing MySQL)
- Password (Set at step 11 - Installing MySQL)
- Set the database type to MYSQL
Example Connection String for MySQL: "DefaultConnection": "server=ZS5BQMT-S7QCE4P,3306;user=WRAdmin;password=secretpassword;database=WebReports; connect timeout=60"
ConnectionStrings: Information available by following the corresponding links.
LicenseKey: Available on your VDM subscription and registration information form.
CompanyID: Available on your VDM subscription and registration information form.
NOTE: Regarding IRIS and Cache databases running in Linux Docker: If the IRIS/Cache server will use a FQDN, you'll need to set the ResolveIP setting to true. When InterSystems drivers run in .Net 5/6 they do not automatically resolve DNS names. If the connection profile to the database will utilize an IP address, this setting should be false.
6. Execute the following command to copy the modified appsettings.json file to the BridgeWorksWR image.
docker cp c:\temp\appsettings.json BridgeWorksWR:/app/
7. Go to Docker Desktop and start the BridgeWorksWR Image. Confirm the BridgeWorksWR Docker Image has started and navigate to https://localhost.
Comments
0 comments
Please sign in to leave a comment.