Sfoglia il codice sorgente

添加docker 内网解析

lushuncheng 6 anni fa
parent
commit
8e1cfa1222
2 ha cambiato i file con 11 aggiunte e 2 eliminazioni
  1. 2 1
      command/Start.php
  2. 9 1
      dockerfile/template.yml

+ 2 - 1
command/Start.php

@@ -118,7 +118,8 @@ class Start
             $template = str_replace('<proginn-branch>', $proginnBranch, $template);
             $template = str_replace('<rooter-branch>', $rooterBranch, $template);
             $template = str_replace('<proginn-frontend-branch>', $proginnFrontendBranch, $template);
-            $template = str_replace('<domain>', $fullDomain, $template);
+            $template = str_replace('<domain>', $domain, $template);
+            $template = str_replace('<fullDomain>', $fullDomain, $template);
             file_put_contents($directory . '/config/docker.yml', $template);
             // nginx 配置
             $proxy = file_get_contents(ROOT_DIR . '/config/nginx/template/proxy.nginx.conf');

+ 9 - 1
dockerfile/template.yml

@@ -29,7 +29,15 @@ services:
       - PROGINN_BRANCH=<proginn-branch>
       - ROOTER_BRANCH=<rooter-branch>
       - PROGINN_FRONTEND_BRANCH=<proginn-frontend-branch>
-      - HOSTNAME=<domain>
+      - HOSTNAME=<fullDomain>
+    extra_hosts:
+      - "<domain>.test.proginn.com:<ip>"
+      - "<domain>.test-rooter.proginn.com:<ip>"
+      - "<domain>.test-jishuin.proginn.com:<ip>"
+      - "git.proginn.com:172.17.17.49"
+      - "git.gitinn.com:172.17.17.49"
+      - "www.gitinn.com:172.17.17.49"
+      - "www.proginn.com:172.17.66.177"
 networks:
   proginn:
     external: true