«前の日記(2017-06-29) 最新 次の日記(2017-07-26)» 編集

会長@腹部日記


2017-07-07 [長年日記]

_ 会社で動かしているmattermostを3.10.0にした

mattermost/mattermost-docker に docker-compose.ymlがあるので、会社内のproxy設定を施して終わり。

なんって楽なんだ。。。

diffはこちら

hubotコンテナ用のdocker networkと固定IPを追加しています。

diff --git a/docker-compose.yml b/docker-compose.yml
index e037ad1..494b78b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,11 @@ version: "2"
 services:

   db:
-    build: db
+    build:
+      context: ./db
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${http_proxy}
     restart: unless-stopped
     volumes:
       - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
@@ -17,12 +21,18 @@ services:
     #  - AWS_SECRET_ACCESS_KEY=XXXX
     #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
     #  - AWS_REGION=us-east-1
+    networks:
+      matternet:
+         ipv4_address: 172.100.0.2
+

   app:
     build:
-      context: app
-      # comment out for team edition
-      dockerfile: Dockerfile-enterprise
+      context: ./app
+      dockerfile: Dockerfile
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${http_proxy}
     restart: unless-stopped
     volumes:
       - ./volumes/app/mattermost/config:/mattermost/config:rw
@@ -38,11 +48,20 @@ services:
       #- MM_CONFIG=/mattermost/config/config.json
     links:
       - db:db
+    networks:
+      matternet:
+         ipv4_address: 172.100.0.3
+
   web:
-    build: web
+    build:
+      context: ./web
+      dockerfile: Dockerfile
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${http_proxy}
     ports:
-      - "80:80"
+      - "23457:80"
       - "443:443"
     restart: unless-stopped
     volumes:
@@ -51,3 +70,17 @@ services:
       - /etc/localtime:/etc/localtime:ro
     links:
       - app:app
+    networks:
+      matternet:
+         ipv4_address: 172.100.0.4
+
+networks:
+  matternet:
+    driver: bridge
+    driver_opts:
+      com.docker.network.enable_ipv6: "false"
+    ipam:
+      config:
+      - subnet: 172.100.0.0/24
+        gateway: 172.100.0.1

Tags: mattermost