1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GitレポジトリをSubversionレポジトリにミラーリングする(実験環境編)

Posted at

やりたいこと

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
1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?