UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
280 stars 162 forks source link

Docker compose for demo #92

Closed avilaton closed 2 months ago

avilaton commented 3 years ago

Hi, I have been reading about unitime and trying to wrap my head around it, to see if we could use to help high-schools create and manage their timetables. I was able to get set up locally using a docker-compose demo I found at https://github.com/vlatka-sinisa/docker-unitime and I thought it would be worth to mention it here, that having that docker-compose file in this repository could be a great way to help newcomers set up unitime locally. It is also a great way to document installation since dockerfiles tend to have all the instructions needed to set up the system. If you think this is a good idea, I could create a pull request for it, maybe you have some guidance on how it would best be done. Thanks

tomas-muller commented 3 years ago

I have only a minimal knowledge of Docker, but being able to create a UniTime instance using Docker is certainly interesting. However, it either needs to support additional features (database selection, ability to create a cluster, SSL certificate, etc.), or it would be only useful for the most basic setup of UniTime.

I am not sure if it makes sense to pull in the docker files into this repository since I am not confident we will be able to maintain it and extend it to provide additional features. We can certainly point the github.com/vlatka-sinisa/docker-unitime project in our documentation as a starting point for anyone interested in using Docker.

avilaton commented 3 years ago

It is not my intention to have this docker-compose file serve as a way to deploy unitime to production but to set up the demo environment, which once coded as a set of docker containers, should end up being as simple as docker-compose up. I have learned that the easier we make it for beginners to set up a demo, the greater the chances of them contributing to the project.

If you had a chance to read through the files in that repository you will see they describe two containers, one for the DB and the other for the server, and in under 20 lines install all dependencies to get ready to run it locally.

Perhaps placing them inside the documentation folder is an option. In any case thanks for the project, it is impressive!. Let me know if you are ok with adding these files to the documentation folder, I can do it as a PR.

tomas-muller commented 3 years ago

Yes, I have looked at the files in the vlatka-sinisa/docker-unitime repo. I am a bit concern about the absolute paths (like /usr/local/tomcat) -- would it work with Docker on Mac OS or Windows? Most of the questions we get from people struggling to install UniTime are actually Windows users.

I can see having it under something like /Documentation/Docker-Example.

avilaton commented 3 years ago

Oh that is the magic of docker, that path is internal to the container, for example https://github.com/vlatka-sinisa/docker-unitime/blob/master/docker/tomcat8/Dockerfile#L12 is mkdir /usr/local/tomcat/data but that happens inside a container. It is as if you got a fresh clean server and you can do that sort of thing inside of it, without affecting the external system.

With that docker setup, all a person needs to have on their machine is docker and docker-compose.

This is also of great help for development, since you can reproduce an environment in seconds, try something out, and if you need, recreate it also within seconds.

I tried running unitime to see if I could help with frontend, or to see if there was a REST api I could use, for example.

tomas-muller commented 2 months ago

A simple docker installation is now available under Documentation/Docker and available starting with UniTime 4.8.126.