My Kallithea with Docker
Warning: The kallithea docker image is based on my personal repository. It may contain experimental features and therefore may not be stable. This repository contains a Dockerfile for kallithea and an example docker-compose file for a more advanced setup.
Simple sqlite instance
To start a simple kallithea instance do the following. You don't even need to clone this repository.
- Install docker
docker run -v kallithea_repos:/var/kallithea/repos -v kallithea_conf:/var/kallithea/conf --name mykallithea -p 5000:5000 domruf/kallithea -d
docker logs mykallitheato see the console output)
That's it. The configuration file and the initial database will automatically be generated if they don't already exist. You can now open http://localhost:5000 in your browser and log in with the user information you see in the console output. You can also find the login information in the password.txt file in the conf volume.
For details on using docker please read the docker documentation.
Fullstack instance with MySQL/PostgreSQL, celery and rabbitmq
The docker image as 2 volumes /var/kallithea/conf and /var/kallithea/repos. The conf contains the kallithea.ini file where you can change the configuration. And it also contains the sqlite kallithea.db database file.
To use MySQL, celery and rabbitmq you have to start a docker container for each service and change the kallithea.ini file accordingly. You can make this really simple by using a docker-compose file like the one in this repository. For details on using docker-compose please read the docker documentation.
In case you want to use the docker-compose file as it is you need to do the following.
docker-compose buildto build a new version of the image. This is optinal. If you don't do this docker will download a kallithea docker image from the docker hub
- Depending on what you want to use remove either the mysql or postgres service from the docker-compose file
docker-compose upto create a initial kallithea.ini file and all volumes and the network
- In the kallithea.ini file you need to change the following settings
use_celery = true
broker.host = rabbitmq
sqlalchemy.db1.url = mysql://kallithea:kallithea@mysql/kallithea?charset=utf8or
sqlalchemy.db1.url = postgresql://kallithea:kallithea@postgres/kallithea
docker-compose stopto stop the services
docker-compose up -dto re-start the services
You can and should change the password and the email address of the initial admin account. If you are familiar with docker-compose you can of course also change all the other settings. But keep in mind that the settings in the docker-compose and the kallithea.ini file must match.