RhodeCode¶
Centralized control for distributed repositories with support for Subversion, GIT and Mercurial.
Installation¶
- Copy configuration file rhodecode.ini to /data/svn/
- Create docker image from Dockerfile
$ cd /data/svn $ wget http://jro-dev.igp.gob.pe:3000/attachments/download/272/rhodecode.ini $ mkdir /home/soporte/docker_apps/rhodecode $ cd /home/soporte/docker_apps/rhodecode $ wget http://jro-dev.igp.gob.pe:3000/attachments/download/273/Dockerfile $ docker build -t rhodecodece .
- Create docker container and update locales (select option 146 and 3)
$ docker run -it --name rhodecode --rm rhodecodece # dpkg-reconfigure locales # cp /root/.rccontrol/community-1/rhodecode.db /data/svn/
- Open new terminal list dockers containers and get the container ID
$ docker ps $ docker commit <CONTAINER ID> rhodecodece:production
- Exit running container (from the first terminal)
- Create a new docker container with the commited image and start the supervisor service using "screen"
$ screen $ docker run -ti --name rhodecode --rm -p 10000:10000 -v /data/svn/:/data/svn -v /data/svn/rhodecode.ini:/root/.rccontrol/community-1/rhodecode.ini rhodecodece:production # supervisord -c /root/.rccontrol/supervisor/supervisord.ini # CTRL + A + D
- Test the app and rescan and remap the repos http://jro-dev.igp.gob.pe:10000
Update app¶
If it is running enter to the screen environment update app, exit screen, list dockers to get the current container ID and commit the new docker image
$ screen -r # rccontrol self-update && rccontrol upgrade '*' # CTRL + A + D $ docker ps $ docker commit <CONTAINER ID> rhodecodece:production
Restart app¶
Before restart the app, delete the old container
$ screen $ docker run -ti --name rhodecode --rm -p 10000:10000 -v /data/svn/:/data/svn -v /data/svn/rhodecode.ini:/root/.rccontrol/community-1/rhodecode.ini rhodecodece:production # supervisord -c /root/.rccontrol/supervisor/supervisord.ini # CTRL + A + D