1
0
-1

Hi

I would like to create two docker containers to house the jogetDB and joget server. I would like the data external to the containers. I used the following as a basis for the docker-compose.yml file (Joget on Docker) but, no matter what I do, I cannot get it to run correctly. The below docker-container.yml file works, but I when it jumps to the setup page I get the following error:

   Sorry, access is forbidden for security reasons.
   Please refresh the previous form before submitting it.

If I expose the volume joget cannot start at all... does anybody have a docker-compose file that has persistent data? 

Thank you in advance

cheers 

ursus


here is my docker-compose.yml file:

version: '3.3'
services:
  jogetdb:
    container_name: jogetdb
    ports:
      - '3306:3306'
    environment:
      - MYSQL_ROOT_PASSWORD=jwdb
      - MYSQL_USER=joget
      - MYSQL_PASSWORD=joget
      - MYSQL_DATABASE=jwdb
    image: 'mysql:5.7'#

  joget:
    container_name: joget
    links:
      - 'jogetdb:jwdb'
    depends_on:
      - jogetdb
    container_name: joget
    ports:
      - '8080:8080'
    environment:
      - MYSQL_HOST=jwdb
      - MYSQL_DATABASE=jwdb
      - MYSQL_PORT=3306
      - MYSQL_USER=joget
      - MYSQL_PASSWORD=joget
    image: jogetworkflow/joget-community
#    volumes:
#      - /docker/joget:/opt/joget/wflow
    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1
      version: "3.9"
      
      services:
          jdb:
              image: mysql:5.7
              volumes:
                  - db_data:/var/lib/mysql
              ports:
                  - "3306:3306"
              restart: always
              environment:
                  MYSQL_ROOT_PASSWORD: rootroot
                  MYSQL_DATABASE: jwdb
                  MYSQL_USER: joget
                  MYSQL_PASSWORD: joget
      
          joget:
              image: jogetworkflow/joget-enterprise
              depends_on:
                  - jdb
              ports:
                  - "8080:8080"
              volumes:
                  - ./wflow:/opt/joget/wflow
              environment:
              - MYSQL_HOST=jdb
              - MYSQL_DATABASE=jwdb
              - MYSQL_PORT=3306
              - MYSQL_USER=joget
              - MYSQL_PASSWORD=joget
      volumes:
          db_data: {}

      ./wflow:/opt/joget/wflow

      using ./wflow means, points to OS folder, where command docker-compose up -d runs. 

      In your case, in the "jdb" service, try to configure the "volumes" the same way i.e. ./wflow

      Then, db data is outside of docker too.


      I noticed that

              - MYSQL_HOST=jdb
              - MYSQL_DATABASE=jwdb
              - MYSQL_PORT=3306
              - MYSQL_USER=joget
              - MYSQL_PASSWORD=joget

      needs to be there, although not in use. it will use the datasource profile in the wflow folder.

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Not sure if this helps.

        I got the command from https://hub.docker.com/r/jogetworkflow/joget-community

        and modified the sample command to -v %cd%:/opt/joget/wflow

        docker run -d --name joget -p 8080:8080 -e MYSQL_HOST=localhost -e MYSQL_DATABASE=jwdb -e MYSQL_PORT=3306 -e MYSQL_USER=root -e MYSQL_PASSWORD=root -v %cd%:/opt/joget/wflow jogetworkflow/joget-community

        I'm able to map the actual directory from my windows to be used by Joget in the container.

        1. Ursus Schneider

          thank you for your input


          Your answer is not docker-compose and you are running MySQL locally (I want both running on the docker server). When I create a persistent store using the volumes in my config (see the last 2 commented lines in my docker-compose.yml file) joget doesn't even start. This I understand as it is looking for files in the /opt/joget/wflow directory which seem to get placed there when joget initially starts. As I am getting the permissions error it cannot copy the files it needs to my persistent store. I did an install without the volumes line, then copied the files that the install copies to the wflow directory to the server and finally uncommented my volume lines i.e. making it persistent but the the error "access is forbidden...". I have done a chown user:user /docker/joget and restarted the containers, this did not help though!

        CommentAdd your comment...