Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MapStore to the docker compose stack #58

Closed

Conversation

Gnafu
Copy link

@Gnafu Gnafu commented May 12, 2020

No description provided.

Copy link
Contributor

@RemiDesgrange RemiDesgrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally make it works, but it's not really "intuitive"

What I recommend, is : launching these migrations in an entrypoint of the container. georchestra/docker should work once "docker-compose up" has been fired.

You could also let autoddl of hibernate do the job for you.

Submodule config:
    > ffd124e - Set consoleAppender
    > b43ba7c - Add documentation
    > a5c5d70 - Indentation fix
@RemiDesgrange
Copy link
Contributor

RemiDesgrange commented Jul 10, 2020

I think I have some trouble with the last image of mapstore.
I docker-compose up -d (and stopped geonetwork, it's summer !!). Then in my browser console I have error the last build of "https://georchestra.mydomain.org/dist/GeOrchestra.js?ed6eb3a3d5c5a5598814 ) it's a problem of path, since I can access https://georchestra.mydomain.org/mapstore/dist/GeOrchestra.js?ed6eb3a3d5c5a5598814

Minor troubles, but we are very close !!!

Also once this is merge, you'll be able to remove a lot of content from http://docs.georchestra.geo-solutions.it/fr/latest/georchestra_integration/

@tdipisa
Copy link

tdipisa commented Sep 2, 2020

Dear @RemiDesgrange I'm sorry for the late answer. We are trying to resume the work of @Gnafu for this PR since he is not available this period unfortunately. Are you still experiencing the above issue? We will be able to check it next days. I'm sorry for the inconvenience. Then we will solve conflicts on this PR and clean up the online doc, where needed.

@@ -138,3 +138,13 @@ services:
- JAVA_OPTIONS=-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF
- XMS=256M
- XMX=1G

mapstore:
image: geosolutionsit/mapstore2-georchestra:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be perfect if https://github.com/georchestra/mapstore2-georchestra/blob/master/.github/workflows/mapstore.yml could generate a georchestra/mapstore image, as for the other apps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, appending something like below in https://github.com/georchestra/mapstore2-georchestra/blob/master/.github/workflows/mapstore.yml should do the trick, but only then we can replace the docker hub image in the compose:

    - name: "Building docker image"
      if: github.repository == 'georchestra/georchestra'
      working-directory: mapstore2-georchestra/
      run: ../mvnw --no-transfer-progress clean package docker:build -Pdocker,log4j-logstash,sentry-log4j  -DdockerImageName=georchestra/mapstore:${{ steps.version.outputs.VERSION }} -DskipTests

    - name: "Logging in docker.io"
      if: github.repository == 'georchestra/georchestra'
      uses: azure/docker-login@v1
      with:
        username: '${{ secrets.DOCKER_HUB_USERNAME }}'
        password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

    - name: "Pushing latest to docker.io"
      if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra'
      run: |
        docker tag georchestra/mapstore:${{ steps.version.outputs.VERSION }} georchestra/mapstore:latest
        docker push georchestra/mapstore:latest
    - name: "Pushing release branch to docker.io"
      if: contains(github.ref, 'refs/heads/20.') && github.repository == 'georchestra/georchestra'
      run: |
        docker push georchestra/mapstore:${{ steps.version.outputs.VERSION }}
    - name: "Pushing release tag to docker.io"
      if: contains(github.ref, 'refs/tags/20.') && github.repository == 'georchestra/georchestra'
      run: |
        docker push georchestra/mapstore:${{ steps.version.outputs.VERSION }}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please PR ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fvanderbiest I got up to here for workflow docker credentials need to be configured:
https://github.com/georchestra/mapstore2-georchestra/runs/1158835723?check_suite_focus=true

Copy link
Member

@fvanderbiest fvanderbiest Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create the PR and we'll review it.
Once merged, push will be allowed

volumes:
- ./config:/etc/georchestra
environment:
- JAVA_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=128m -Dgeorchestra.datadir=/etc/georchestra
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing -Dgeorchestra.extensions=<mapstore_dynamic_files_folder_path> ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving it as is extensions.json and dist directory are created in /etc/georchestra/mapstore on the container which is georchestra datadir for mapstore, if this is ok no modification is needed, if a different directory is needed let me know so I commit it here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, you're the mapstore expert.
I let you decide which is best ;-)

@lpasquali
Copy link
Contributor

lpasquali commented Sep 23, 2020

Hello @RemiDesgrange @fvanderbiest @landryb

I see that all applications in georchestra have their ddl files in the database Docker images and databases for everything else but mapstore are initialized here:
https://github.com/georchestra/georchestra/tree/master/postgresql
As the mapstore container is dependant on database one, shouldn't we let database prepare things before mapstore container is created?
and then replicate these files to be loaded sequentially in the docker build of postgres?

@fvanderbiest
Copy link
Member

shouldn't we let database prepare things before mapstore container is created?

Correct !

@lpasquali
Copy link
Contributor

I think I have some trouble with the last image of mapstore.
I docker-compose up -d (and stopped geonetwork, it's summer !!). Then in my browser console I have error the last build of "https://georchestra.mydomain.org/dist/GeOrchestra.js?ed6eb3a3d5c5a5598814 ) it's a problem of path, since I can access https://georchestra.mydomain.org/mapstore/dist/GeOrchestra.js?ed6eb3a3d5c5a5598814

Minor troubles, but we are very close !!!

Also once this is merge, you'll be able to remove a lot of content from http://docs.georchestra.geo-solutions.it/fr/latest/georchestra_integration/

concerning this issue, I had to build up a fresh installation yesteday of the compose for taking over the work on this PR and I did not experience the problem above

@lpasquali
Copy link
Contributor

@fvanderbiest I tried to see how I cuold solve the conflicts but I do not have permissions, everything else is in place to be merged IMO

@fvanderbiest fvanderbiest marked this pull request as ready for review September 25, 2020 07:06
@fvanderbiest
Copy link
Member

Cannot merge if there are conflicts ... either update this one, or create a new one.
Thanks !

@lpasquali
Copy link
Contributor

Cannot merge if there are conflicts ... either update this one, or create a new one.
Thanks !

ok @fvanderbiest I will do a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants