You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/06/11 22:24:40 UTC

[incubator-apisix-dashboard] 01/01: feat: added Dashboard dockerfile

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch feat-dockerfile
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git

commit 99f000c28d31a98038dbfac2ec6ec12b6e5d094f
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Fri Jun 12 06:21:05 2020 +0800

    feat: added Dashboard dockerfile
---
 Dockerfile                 |  4 ++--
 compose/docker-compose.yml | 20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b2a51d7..72ac8d3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,10 +5,10 @@ WORKDIR /usr/src/app/
 USER root
 
 COPY package.json /usr/src/app/
-RUN npm install --no-cache --production
+RUN yarn
 
 COPY . /usr/src/app/
-RUN npm run build && rm -rf /usr/src/app/node_modules
+RUN yarn build && rm -rf /usr/src/app/node_modules
 
 # phase-run
 FROM nginx:1.16-alpine
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index c899c8d..b4443d3 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -82,16 +82,16 @@ services:
         ipv4_address: 192.17.5.15
 
 
-  # dashboard:
-  #   build:
-  #     context: ./..
-  #     dockerfile: Dockerfile
-  #   restart: always
-  #   ports:
-  #     - "80:80/tcp"
-  #   networks:
-  #     apisix-dashboard:
-  #       ipv4_address: 192.17.5.16
+  dashboard:
+    build:
+      context: ./..
+      dockerfile: Dockerfile
+    restart: always
+    ports:
+      - "80:80/tcp"
+    networks:
+      apisix-dashboard:
+        ipv4_address: 192.17.5.16
 
 networks:
   apisix-dashboard: