やりたいこと
gitレポジトリをsubversionレポジトリにミラーリングする
git user -> git server -> svn server -> svn user
準備
- GitLab
- Redmine&Subversion
セットアップ
docker composeを使うと、、、あら楽ちん。このまま本番環境には持っていけませんが、実験するには十分です。
インスタンスを立ち上げたら、RedmineとGitLabそれぞれでユーザーやレポジトリを設定します。
version: '3.7'
services:
redmine:
container_name: redmine
image: redmine
restart: always
networks:
- mynetwork
ports:
- 80:3000
volumes:
- ./data/plugins:/usr/src/redmine/plugins
- ./data/themes:/usr/src/redmine/public/themes
- ./data/svn:/srv/svn
environment:
REDMINE_DB_MYSQL: redmine-db
REDMINE_DB_PASSWORD: redmine
remine-db:
container_name: redmine-db
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: redmine
MYSQL_DATABASE: redmine
networks:
- mynetwork
volumes:
- ./data/db:/var/lib/mysql
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
gitlab:
container_name: gitlab
image: 'gitlab/gitlab-ce:latest'
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['gitlab_shell_ssh_port'] = 2224
networks:
- mynetwork
ports:
- '8929:80'
- '2224:22'
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/logs:/var/log/gitlab
- ./gitlab/data:/var/opt/gitlab
subversion:
container_name: svn
image: 'kuchida1981/subversion-httpd'
restart: always
environment:
SVN_DEFAULT_USER: admin
SVN_DEFAULT_USER_PASSWD: admin
networks:
- mynetwork
ports:
- 10080:80
volumes:
- ./svn:/var/svn/repos
networks:
mynetwork:
name: mynetwork
driver: bridge
- 参考
-
http://sig9.hatenablog.com/entry/2019/07/06/000000
- docker-compose.ymlはこのサイトを参考にさせていただきました。
- https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose
- https://docs.docker.com/compose/
- https://qiita.com/bezeklik/items/b9d75ee74e0ae4c6d42c
- https://hub.docker.com/r/kuchida1981/subversion-httpd/
- https://docs.docker.com/network/network-tutorial-host/
- https://knowledge.sakura.ad.jp/16082/
-
http://sig9.hatenablog.com/entry/2019/07/06/000000