Skip to content

Commit

Permalink
[CE-405] Change expose port for user dashboard
Browse files Browse the repository at this point in the history
Expose 8081 for user dashboard.
Add default env value for MONGO_PORT in user-dashboard.

Change-Id: I06e3a594edfb2763df51e67f935db7e95502136c
Signed-off-by: Haitao Yue <[email protected]>
  • Loading branch information
hightall committed Jul 2, 2018
1 parent 06763ee commit 9ed8658
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
- dashboard_mongo
- operator-dashboard
ports:
- "8081:8080"
- "8081:8081"
environment:
- RESTFUL_SERVER=operator-dashboard:8080
- DEBUG=node:*
Expand All @@ -82,7 +82,6 @@ services:
- SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- MONGO_HOST=dashboard_mongo
- MONGO_PORT=27017
- MONGO_DB=user_dashboard
- FROM_EMAIL=$FROM_EMAIL
- WEBROOT=$USER_DASHBOARD_WEBROOT
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
- dashboard_mongo
- operator-dashboard
ports:
- "8081:8080"
- "8081:8081"
environment:
- NODE_ENV=production
- RESTFUL_SERVER=operator-dashboard:8080
Expand All @@ -82,7 +82,6 @@ services:
- SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- MONGO_HOST=dashboard_mongo
- MONGO_PORT=27017
- MONGO_DB=user_dashboard
- FROM_EMAIL=$FROM_EMAIL
- WEBROOT=$USER_DASHBOARD_WEBROOT
Expand Down
3 changes: 2 additions & 1 deletion docker/user-dashboard/Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ ENV PATH ${PATH}:/node_modules/.bin
COPY user-dashboard/src /var/www
RUN cd /var/www && ln -sf /node_modules . && npm run build
WORKDIR /var/www
EXPOSE 8080
EXPOSE 8081

ENV FABRIC_VERSION 1.0.5
RUN cd /tmp && ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') && echo $ARCH &&wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${FABRIC_VERSION}/hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && tar -zxvf hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && mv bin/configtxgen /usr/local/bin/configtxgen
COPY user-dashboard/fabric/fabric /etc/hyperledger/fabric
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
ENV MONGO_PORT 27017

CMD ln -sf /node_modules . && npm run start
3 changes: 2 additions & 1 deletion dockerhub/latest/user-dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ ENV PATH ${PATH}:/node_modules/.bin
RUN mv /tmp/cello/user-dashboard/src /var/www
RUN cd /var/www && ln -sf /node_modules . && npm run build
WORKDIR /var/www
EXPOSE 8080
EXPOSE 8081

ENV FABRIC_VERSION 1.0.5
RUN cd /tmp && ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') && echo $ARCH &&wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${FABRIC_VERSION}/hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && tar -zxvf hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && mv bin/configtxgen /usr/local/bin/configtxgen
RUN mkdir -p /etc/hyperledger
RUN mv /tmp/cello/user-dashboard/fabric/fabric /etc/hyperledger/fabric
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
ENV MONGO_PORT 27017

CMD ln -sf /node_modules . && npm run start
4 changes: 2 additions & 2 deletions user-dashboard/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"scripts": {
"start": "if-env NODE_ENV=production && npm run start:prod || npm run start:dev",
"stop": "egg-scripts stop --title=egg-server-user-dashboard",
"start:prod": "egg-scripts start --title=user-dashboard --env prod --stricky --port 8080",
"start:dev": "egg-bin dev --stricky --port 8080",
"start:prod": "egg-scripts start --title=user-dashboard --env prod --stricky --port 8081",
"start:dev": "egg-bin dev --stricky --port 8081",
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test": "npm run lint -- --fix && npm run test-local",
Expand Down

0 comments on commit 9ed8658

Please sign in to comment.