<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 8. 使用 compose 部署 GitLab 應用 #### 1. 介紹 上一篇:[Docker Compose的介紹與安裝(七)](https://www.rails365.net/articles/docker-compose-de-jie-shao-yu-an-zhuang-qi) 之前介紹過compose,現在來使用它,直接來部署一個gitlab應用。 ![](https://box.kancloud.cn/834810744d12ae581c395c7475b2c1f5_1844x990.png) #### 2. 下載鏡像 我們部署的是[sameersbn/docker-gitlab](https://github.com/sameersbn/docker-gitlab)這個鏡像。 首先把它下載下來。 ``` $ docker pull sameersbn/gitlab ``` #### 3. 配置文件 我們不需要去run它,只需要先下載一個compose的配置文件。 ``` $ wget https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml ``` 打開這個文件,把它的內容按照你自己的需要修改,比如改改github登錄的配置信息,郵件發送的配置信息等。 比如我的配置如下: ``` version: '2' services: redis: restart: always image: sameersbn/redis:latest command: - --loglevel warning volumes: - /srv/docker/gitlab/redis:/var/lib/redis:Z postgresql: restart: always image: sameersbn/postgresql:9.5-4 volumes: - /srv/docker/gitlab/postgresql:/var/lib/postgresql:Z environment: - DB_USER=gitlab - DB_PASS=password - DB_NAME=gitlabhq_production - DB_EXTENSION=pg_trgm gitlab: restart: always image: sameersbn/gitlab:8.15.2 depends_on: - redis - postgresql ports: - "10080:80" - "10022:22" volumes: - /srv/docker/gitlab/gitlab:/home/git/data:Z environment: - DEBUG=false - DB_ADAPTER=postgresql - DB_HOST=postgresql - DB_PORT=5432 - DB_USER=gitlab - DB_PASS=password - DB_NAME=gitlabhq_production - REDIS_HOST=redis - REDIS_PORT=6379 - TZ=Asia/Beijing - GITLAB_TIMEZONE=Beijing - GITLAB_HTTPS=false - SSL_SELF_SIGNED=false - GITLAB_HOST=gitlab.rails365.net - GITLAB_PORT=10080 - GITLAB_SSH_PORT=10022 - GITLAB_RELATIVE_URL_ROOT= - GITLAB_SECRETS_DB_KEY_BASE=xxx - GITLAB_SECRETS_SECRET_KEY_BASE=xxx - GITLAB_SECRETS_OTP_KEY_BASE=JBSWY3DPEHPK3PXP - GITLAB_ROOT_PASSWORD= - GITLAB_ROOT_EMAIL= - GITLAB_NOTIFY_ON_BROKEN_BUILDS=true - GITLAB_NOTIFY_PUSHER=false - GITLAB_EMAIL=hfpp2012@rails365.net - GITLAB_EMAIL_REPLY_TO=noreply@example.com - GITLAB_INCOMING_EMAIL_ADDRESS=reply@example.com - GITLAB_BACKUP_SCHEDULE=daily - GITLAB_BACKUP_TIME=01:00 - SMTP_ENABLED=true - SMTP_DOMAIN=192.168.33.10 - SMTP_HOST=smtpdm.aliyun.com - SMTP_PORT=25 - SMTP_USER=hfpp2012@rails365.net - SMTP_PASS=xxxxx - SMTP_STARTTLS=true - SMTP_AUTHENTICATION=plain .... - OAUTH_GITHUB_API_KEY=8910bb915c112971520b - OAUTH_GITHUB_APP_SECRET=dc04e2fa55626bd0b1433c35adb57d85511d5772 ``` 有些地方被我省略了,還有些地方被我用`xxx`隱藏了。 #### 4. compose up 現在改完之后就可以直接運行了。我們使用下面的命令來運行。 ``` $ docker-compose up ``` 運行的時候會發現會下載其他的鏡像,比如postgresql,還有redis。因為compose是允許不同的鏡像容器互相鏈接的,從上面的配置文件中的內容也可以看出來。 如果要以守護態運行,可以加`-d`參數。 #### 5. nginx配置 這個鏡像默認是會啟用10080端口訪問,我們可以用nginx反向代理到這個端口上。 比如:gitlab.conf。 ``` upstream gitlab { server 127.0.0.1:10080; } server { listen 80; server_name gitlab.rails365.net; server_tokens off; root /dev/null; location / { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Frame-Options SAMEORIGIN; proxy_pass http://gitlab; } } ``` 完結。 下一篇:[使用compose部署Rocket.Chat應用(九)](https://www.rails365.net/articles/shi-yong-compose-bu-shu-rocket-chat-ying-yong)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看