################ GitBucket 導入 ################ :small:`created at 2019-08-19 17:49+0900` GitBucket とはgitリポジトリをブラウザで管理できちゃう便利システム。 https://github.com/gitbucket/gitbucket 以下、GitBucketの導入手順についての覚書。 **************************** docker-composeファイル作成 **************************** 次のようにdocker-compose.ymlファイルを作成する。 .. code-block:: yaml version: '3.7' services: gitbucket: image: gitbucket/gitbucket container_name: gitbucket environment: - VIRTUAL_HOST=gitbucket.r-square.net - VIRTUAL_PORT=8080 expose: - 8080 - 29418 volumes: - /etc/localtime:/etc/localtime:ro - /var/docker.d/gitbucket/data:/gitbucket logging: driver: journald networks: - common_link restart: always networks: common_link: external: true * networksのcommon_linkと環境変数VIRTUAL_HOST,VIRTUAL_PORTはnginx-proxyに転送してもらうための設定。 * /etc/localtimeはコンテナ内のタイムゾーンをホスト側へ合わせるための設定。 * コンテナ内の/gitbucketにgitbucket関係のデータがモリモリ作られるので、ホスト側(/var/docker.d/gitbucket/data)へつなぐ。 * loggingドライバーはお好みで設定。 ******************************************** docker-compose 起動 ******************************************** バックグラウンドで起動させる。 .. code-block:: bash sudo docker-compose up -d ログインして、rootユーザのデフォルトパスワードを変更する。 * What's default root username and password? * https://github.com/gitbucket/gitbucket/wiki/FAQ#2-whats-default-root-username-and-password ******************************************** まとまらないまとめ ******************************************** 特に事件も起こらずに終わった。