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

document running mvn test + docker compose #322

Open
mr-c opened this issue Apr 13, 2021 · 19 comments
Open

document running mvn test + docker compose #322

mr-c opened this issue Apr 13, 2021 · 19 comments

Comments

@mr-c
Copy link
Member

mr-c commented Apr 13, 2021

diff --git a/docker-compose.yml b/docker-compose.yml
index d0d8d6e..6bd31ae 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -38,6 +38,8 @@ services:
     restart: always
     image: mongo:3.4
     command: mongod --setParameter="internalQueryExecMaxBlockingSortBytes=335544320"
+    ports:
+     - "27017:27017"
     volumes:
       - type: volume
         source: mongo
@@ -45,8 +47,8 @@ services:
   sparql:
     restart: always
 ## For debugging, expose the Fuseki port by enabling:
-#    ports:
-#     - "3030:3030"
+    ports:
+     - "3030:3030"
 ## To find the admin password, try:
 ##   docker-compose exec sparql grep admin /fuseki/shiro.ini
     image: stain/jena-fuseki:3.4.0
docker compose down
docker compose up

# in a new terminal
mvn test

Can this be done without editing docker-compose.yml?

@oceenachi
Copy link

A new compose file e.g docker-compose-test.yml can be created with the content of docker-compose.yml and the new changes. Then we can run docker compose -f docker-compose-test.yml up. This starts up the application with the contents of the test.yml thereby leaving docker-compose the way it is.

@mr-c
Copy link
Member Author

mr-c commented Apr 15, 2021

A new compose file e.g docker-compose-test.yml can be created with the content of docker-compose.yml and the new changes.

It would be best to not "repeat ourselves" by having the same contents in two files, perhaps https://docs.docker.com/compose/extends/ has a hint?

@oceenachi
Copy link

Okay, so the new test.yml shouldn't repeat all the contents rather it should just contain the new changes right ?

@mr-c
Copy link
Member Author

mr-c commented Apr 15, 2021

Okay, so the new test.yml shouldn't repeat all the contents rather it should just contain the new changes right ?

Correct!

@oceenachi
Copy link

Alright then. Thanks

@oceenachi
Copy link

Hi @mr-c , can you talk about this task a bit more, I'm not certain I fully understand it so I haven't been able to work on it.

Secondly, Is the documentation here similar to the docs I wrote on #327.

I will also love to understand the difference between these yml files. a/docker-compose.yml b/docker-compose.yml.

@obasekiosa
Copy link
Contributor

Hi @mr-c , can you talk about this task a bit more, I'm not certain I fully understand it so I haven't been able to work on it.

Secondly, Is the documentation here similar to the docs I wrote on #327.

I will also love to understand the difference between these yml files. a/docker-compose.yml b/docker-compose.yml.

I think what is required is a setup with adequate documentation that explains to users of this project the steps required to run tests without having to modify docker compose files that come with the project.

@oceenachi
Copy link

Okay so it is similar to #327 right?

@obasekiosa
Copy link
Contributor

obasekiosa commented Apr 20, 2021

Okay so it is similar to #327 right?

Yes it's actually very similar but not quite the same.

Without going too much into unnecessary detail. In this issue what's required is a docker compose configuration file that allows a user to connect and run all required tests.
This "new" configuration file shouldn't be a duplicate of the configuration that already exists

https://docs.docker.com/compose/extends/

Note: something similar is already implemented in the project.

@oceenachi
Copy link

Okay just a file is what is needed.

@obasekiosa
Copy link
Contributor

Okay just a file is what is needed.

With adequate documentation.

You could choose to add the file yourself or give instructions on how to create and use such a file.

@oceenachi
Copy link

okay thanks

@obasekiosa
Copy link
Contributor

okay thanks

Keep in mind a criteria is to ensure docker-compose.yml is never edited manually.

@oceenachi
Copy link

yea i already got that

@oceenachi
Copy link

So I'm trying to run my tests on my local and all my graphiz tests are failing. Here is the error I am having and I don't know what I am missing

image

@obasekiosa
Copy link
Contributor

So I'm trying to run my tests on my local and all my graphiz tests are failing. Here is the error I am having and I don't know what I am missing

image

Do you have graphviz installed?

And what os are you running on?

@oceenachi
Copy link

No i don't have it installed

@obasekiosa
Copy link
Contributor

No i don't have it installed

You have to install it.

@oceenachi
Copy link

okay

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

No branches or pull requests

3 participants