-
Notifications
You must be signed in to change notification settings - Fork 96
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 Dockerfile and a docker-compose to run Skosmos with Fuseki #700
Conversation
I am trying to get this to work, but when i add new data from other .ttl files, the data is not shown on the skosmos website. I ran your commands first, then some more of the same curl requests: $ curl -I -X POST -H Content-Type:text/turtle -T ./stadGentTTL/diensten.ttl -G http://localhost:3030/skosmos/data as you can see here the data is not showing up and there is an internal server error on an api request. my config.ini file is included here I am running this environment on mac os 10.13.3. EDIT: when i search for data in the top right corner of the skosmos site, i get an error: 127.0.0.1:3030 connection refused |
I can try it on a different computer in a few hours. Let me try it and see if there's something missing. |
@kinow Thanks for the PR! Many people have been interested in a Dockerized Skosmos. @mhabsaoui Is this similar to what you've done to get Skosmos running in Docker? I'd be happy if the people using Docker to run Skosmos could review and agree on this PR, then it can be merged. I've used Docker very little so it's difficult for me to comment. |
I got working now, connecting to 'fuseki' instead of localhost seems to work just fine. |
Hi, @osma Yep, I was using about the same docker-compose file running two containers : stain/jena-fuseki + a built one including php-apache which had a bind-mount volume (-v ./Skosmos:/var/www/html) in order to mount the skosmos web app (e.g. the Skosmos directory created by the git clone of skosmos repository) inside the skosmos container. PS : Sorry, I was very ill late;y and didn't had the chance to modify the Tutorial as intended. Is it still needed or all info about Docker will be added to the Readme after this PR ? @Jefwillems Indeed, 'localhost' is local (internally) to any docker container.So the querys fail because it doesn't go outside the skosmos container. Using the container name (e.g. fuseki) makes the querys to go outside the skosmos container, and to be delivered to the jena-fuseki container : all this thanks to the docker network (docker0). @kinow We don't need all those extensions, no need more than this to make skosmos work (locale language install is though not madatory, but just to make Skosmos show vocabularies in the chosen default language...). Cheers. |
@Jefwillems got sidetracked at work and couldn't look on it, sorry. I believe you got it all working, and @mhabsaoui also included a great answer to your issue above. @mhabsaoui owe you an apology. I hadn't seen there was a previous work on running Skosmos + Fuseki with Docker. Saw in issue #635 some notes about it too. I've confirmed that we didn't need all those extensions (PR updated). The main difference I see now between your example and this pull request is that you are using Docker Compose version 2 syntax, so things like the |
@kinow You're welcome on any improvements to Skosmos 👍
yeah docker-engine API version 18.02 / docker-compose version 3.6 now aleady released! (version 2 was just a constraint relative to my WIP project...)
container_name seems still supported on latest reference doc links seems still to be supported. But, i quote,
So with latest API version no more need of And using
=> My pleasure to review it ASAP ;-) Cheers. |
@osma just FYI, as promised I have initiated a wiki page for Docker use on Skosmos based on @kinow 's fork. Did not found the merged branch dedicated to Docker on NatLibFi... Cheers. |
@mhabsaoui excellent doc!!! I'm updating this pull request to include a locale in the installation steps of the Dockerfile. If I remember well, yours had at least the French locale. I didn't copy that part from your previous example, and only when @osma pointed out in #704 that that's the reason why I was seeing 1/ Not sure if we should include a note about it in the wiki? Props again for the amazing - and quick - job with the docs! |
Finished updating the Adapted the part of locales to support what comes in the Now top menu working as expected! Translations working with no issues so far. Cheers |
@kinow Yep, indeed I remember playing some with locales as following
Always usefull to add as tip for extended languages needs.
Why not, could be interesting to add as a suggestion which would make the Dockerfile part clearer maybe... For example ==>
Cheers. |
@osma @henriyli @mhabsaoui I believe this is ready for review now. This pull request provides the The documentation was done by @mhabsaoui , and if this PR gets merged, we just need to re-word the following
To reflect that the repository to be cloned is this one 🎉 Ta ps: @mhabsaoui I noticed reviewing the docs tonight again the trick for running composer in a Docker container! Sometimes devs at $work have issues with composer (especially after fiddling with extensions like xdebug), so will add a note in the internal Wiki with your tip :D thanks heaps! |
@mhabsaoui Can you please check whether this is OK from your perspective? I would like to merge this sooner rather than later (definitely for Skosmos 2.0) but don't really have the time to delve into Docker now. If it's working for at least two people then it could go in and be improved later if necessary. |
@osma Checked Dockerfile + docker-compose for skosmos/fuseki ==> OK.
As we can see below, tripleCount/triples is the same as ysa'one 👍 Yet, here some additionnal notes :
Otherwise, Skosmos shows error about url failing as following... FR not activated in Skosmos config FR activated in Skosmos config
Also, in Cheers. |
Thanks for the great and detailed reply @mhabsaoui !
Agreed. Adding in a new commit. After that, here's the result of
Indeed. In my case I use Docker with Skosmos to reproduce issues and experiment a few things. Normally I prefer that it's not persisted. But other users may prefer to use a volume. What about the following comment in the Dockerfile? Pushing in a commit here, but happy to revert it later.
Though volumes is an option, there's another alternative in the
I believe all of these final notes can be addressed in the Wiki documentation. So there would be no change in this PR. WDYT? |
Pushed two more commits, and also rebase+push-force'd. |
@kinow Except the container naming I would use as a preference |
I use a fuseki container for Jena development already, so I thought about giving it a more specific name so I know which container is which. Perhaps skosmos and skosmos-fuseki? |
@kinow Of course we can use any whiched container name by modifying compose file. |
|
@osma @mhabsaoui names update to skosmos and skosmos-fuseki Notes about volume data persistence for Fuseki added in this revision of the Wiki Notes about the configuration file changes required to use local Docker fuseki added in this revision There were already notes about locale (we also provide the same set that is included in the default configuration file). (I didn't put the configuration file specific name (config.inc) as I believe it may change near 2.x release?) 🎉 |
Pushed once again after rebasing against the master branch 👍 ready for review once Scrutinizer+Travis are OK building it |
Thanks for your hard work on this! I think it's good enough to go into 2.0. After all it's not going to do any harm for non-Docker usage. I will merge this as it is and if new problems turn up, please open another issue or PR. |
Thanks for merging and for preparing 2.0. Kudos to @mhabsaoui who had started it before, and had patience to review my pull request with great suggestions, and also started the Wiki page! |
Not sure if others would be interested. I started a simple Docker environment as I am on a new notebook and didn't want to install PHP + Apache + Fuseki etc just for developing SKOSMOS again.
To get everything up and running, once in the project folder:
And with that SKOSMOS should be running on http://localhost:8000.
Feel free to close if that's not interesting at this point :-) just in case someone else was thinking about doing something along these lines. It can be easily modified to also support nginx.