Running the project locally - PSW-2020-ORG4/HealthcareSystem GitHub Wiki

Local deployment

Local deployment of the entire system via Docker Compose is available. It will run PatientWebApp on port 8181, IntegrationAdapters on port 8282, GraphicalEditorServer on port 5001, and an ISA project for showcasing the IntegrationAdapters functionalities on port 8383.

  • Prerequisites: PowerShell, Docker, Docker Compose, .NET Core CLI
  • Usage:
    • Directly with Compose. The Compose files are located in the compose/local-deployment folder. The HealthcareSystem solution needs to be built and published in order for the Docker images to build correctly.
    • Via PowerShell scripts added for convenience. The launch script is healthcaresystem-up.ps1, and the shutdown script is healthcaresystem-down.ps1.

PatientWebApp

Necessary components: PatientWebApp, PatientService, UserService, NotificationService, FeedbackAndSurveyService, ScheduleService, database (MySQL for Development environment, Postgres for Test environment)

Currently provided quick launch methods (both will run the PatientWebApp on port 8585):

  • PowerShell scripts
    Scripts for launch (pwa-up.ps1) and shutdown (pwa-down.ps1) are in the repository root.
    • Prerequisites: PowerShell, Docker, Docker Compose, .NET Core CLI, free port 8181 (or edit Compose file locally to change port)
    • Usage:
      .\pwa-up [-noDbBuild] [-noServiceBuild] [-dev] for launch
      Use the -noDbBuild flag if the Docker image for the initialized database has already been built and there have been no changes to the data model or data seeding. It's recommended to use this whenever possible since building the database image slows down the launch.
      Use the -noServiceBuild flag if the service Docker images have already been built and there have been no changes.
      Use the -dev flag to launch the Development environment, otherwise the Test environment will be used. Using the Test environment is recommended, since the only difference is in the database they use and the Postgres container launches significantly faster.
      .\pwa-down [-rmi] for shutdown
      Use the -rmi flag to remove the service Docker images during shutdown.
      The script will remove both the Test and Development environment. There is no need to use the pwa-down script if the app is going to be launched again immediately afterwards (for example during development), since the pwa-up script will clean up the existing containers before restarting.
  • Docker Compose file
    If the PowerShell scripts are inconvenient, use the Compose files located in the compose/pwa folder directly.
    • Prerequisites: Docker, Docker Compose, free port 8181 (or edit Compose file locally to change port)
    • Usage: See the PowerShell scripts for an example of usage. In order for the Compose files to work correctly, the solution needs to be published with the Release configuration, and the database Docker image needs to be pre built as:
      (HealthcareSystem/Backend/Dockerfile.postgre) with the name seeded-postgre for the Test environment
      (HealthcareSystem/Backend/Dockerfile.mysql) with the name seeded-mysql for the Development environment.

GraphicalEditor

Currently provided quick launch methods for GraphicalEditorServer (both will run the GraphicalEditorServer on port 5001):

  • PowerShell scripts
    Scripts for launch (ges-up.ps1) and shutdown (ges-down.ps1) are in the repository root.
    • Prerequisites: PowerShell, Docker, Docker Compose, .NET Core CLI, free port 5001 (or edit Compose file locally to change port)
    • Usage:
      .\ges-up [-noDbBuild] [-noServiceBuild] [-dev] for launch
      Use the -noDbBuild flag if the Docker image for the initialized database has already been built and there have been no changes to the data model or data seeding. It's recommended to use this whenever possible since building the database image slows down the launch.
      Use the -noServiceBuild flag if the service Docker images have already been built and there have been no changes.
      Use the -dev flag to launch the Development environment, otherwise the Test environment will be used. Using the Test environment is recommended, since the only difference is in the database they use and the Postgres container launches significantly faster.
      .\ges-down [-rmi] for shutdown
      Use the -rmi flag to remove the service Docker images during shutdown.
      The script will remove both the Test and Development environment. There is no need to use the ges-down script if the server is going to be launched again immediately afterwards (for example during development), since the ges-up script will clean up the existing containers before restarting.
  • Docker Compose file
    If the PowerShell scripts are inconvenient, use the Compose files located in the compose/ges folder directly.
    • Prerequisites: Docker, Docker Compose, free port 5001 (or edit Compose file locally to change port)
    • Usage: See the PowerShell scripts for an example of usage. In order for the Compose files to work correctly, the solution needs to be published with the Release configuration, and the database Docker image needs to be pre built as:
      (HealthcareSystem/Backend/Dockerfile.postgre) with the name seeded-postgre for the Test environment
      (HealthcareSystem/Backend/Dockerfile.mysql) with the name seeded-mysql for the Development environment.

IntegrationAdapters

⚠️ **GitHub.com Fallback** ⚠️