Skip to content

WebProtégé Deployment via Docker

Matthew Horridge edited this page Nov 12, 2019 · 6 revisions

Follow these step-by-step instructions to deploy WebProtégé using the cross-platform Docker container technology.

Prerequisite

Download and install Docker Desktop which will include the Docker Compose. Follow the installation instructions at the Docker Website.

Running WebProtégé via docker-compose

  1. Create a new file called "docker-compose.yml" and copy-and-paste the following text:
    version: '3'
    
    services:
      wpmongo:
        image: mongo:4.1-bionic
      webprotege:
        image: protegeproject/webprotege
        restart: always
        environment:
          - webprotege.mongodb.host=wpmongo
        ports:
          - 5000:8080
        depends_on:
          - wpmongo
  2. Enter this following command in the Terminal to start the docker container.
    $ docker-compose up
  3. Open Google Chrome (or any other Web browser) and go to http://localhost:5000 to open the WebProtégé login page.

Completing the Initial Setup

  1. Enter this command in the Terminal to list the running containers. Look for the name of the WebProtégé container (e.g., webprotege_webprotege_1)
    $ docker-compose ps
             Name                       Command             State           Ports
    --------------------------------------------------------------------------------------
    webprotege_webprotege_1   catalina.sh run               Up      0.0.0.0:5000->8080/tcp
    webprotege_wpmongo_1      docker-entrypoint.sh mongod   Up      27017/tcp
  2. Enter the docker exec command along with the WebProtégé container name to access it in an interactive bash shell. For example:
    $ docker exec -it webprotege_webprotege_1 bash
  3. Set up an administrator account by executing the webprotege-cli.jar application from inside the container. Enter your chosen user name, email address and password to complete the setup.
    java -jar /webprotege-cli.jar create-admin-account
    Please enter a user name for the administrator:
    Please enter an email address for the administrator:
    Please enter a password for the administrator account:
    Please confirm the password:
    
  4. Login to WebProtégé as an admin using the previously created credential and go to the application setting page by visiting http://localhost:5000/#application/settings
  5. Fill out all the mandatory fields and select all the option items in the "Permission" section.

WebProtégé is ready to provide its services on the Web to many users!

Acknowledgement

Special thanks for @Azolo for his contribution of writing the initial Dockerfile and his inputs in the forum discussion.