File tree 3 files changed +25
-18
lines changed
3 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 1
- FROM node
1
+ FROM node:boron-alpine
2
2
EXPOSE 3000
3
3
4
- RUN apt-get update && \
5
- apt-get -y install jq && \
6
- apt-get clean
4
+ RUN apk --update --no-cache add jq curl tar
5
+
6
+ LABEL org.label-schema.vendor="IBM" \
7
+ org.label-schema.name="$IMAGE_NAME" \
8
+ org.label-schema.description="$IMAGE_DESCRIPTION" \
9
+ org.label-schema.vcs-ref=$VCS_REF \
10
+ org.label-schema.vcs-url=$VCS_URL \
11
+ org.label-schema.license="Licensed Materials - Property of IBM" \
12
+ org.label-schema.schema-version="1.0"
7
13
8
14
RUN mkdir -p /usr/src/app
9
15
WORKDIR /usr/src/app
10
16
11
17
RUN curl -L https://github.com/watson-developer-cloud/conversation-simple/archive/master.tar.gz --output /tmp/master.tar.gz && \
12
18
tar -xzvf /tmp/master.tar.gz -C /usr/src/app --strip-components 1
13
19
14
- RUN npm install --production && npm cache clean
20
+ RUN npm install --production
15
21
16
- COPY *.sh /usr/src/app
22
+ COPY entrypoint.sh /usr/src/app
23
+ RUN chmod +x /usr/src/app/entrypoint.sh
17
24
18
- CMD [ "/usr/src/app/run-server .sh" ]
25
+ CMD [ "/usr/src/app/entrypoint .sh" ]
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/sh
2
+
2
3
export CONVERSATION_PASSWORD=$( echo " $CONVERSATION_SERVICE_CAR " | jq -r ' .password' )
3
4
export CONVERSATION_USERNAME=$( echo " $CONVERSATION_SERVICE_CAR " | jq -r ' .username' )
4
- echo " CONVERSATION_USERNAME == $CONVERSATION_USERNAME "
5
- echo " CONVERSATION_PASSWORD == $CONVERSATION_PASSWORD "
6
- npm start
5
+ echo " npm start"
6
+ /usr/local/bin/npm start
Original file line number Diff line number Diff line change 3
3
apiVersion : v1
4
4
kind : Service
5
5
metadata :
6
- name : bot-son
6
+ name : watson-conversation-app
7
7
labels :
8
- app : bot-son
8
+ app : watson-conversation-app
9
9
tier : frontend
10
10
spec :
11
11
type : NodePort
12
12
ports :
13
13
- port : 3000
14
14
selector :
15
- app : bot-son
15
+ app : watson-conversation-app
16
16
tier : frontend
17
17
---
18
18
# Application to deploy
19
19
apiVersion : extensions/v1beta1
20
20
kind : Deployment
21
21
metadata :
22
- name : bot-son
22
+ name : watson-conversation-app
23
23
spec :
24
24
replicas : 2 # tells deployment to run 2 pods matching the template
25
25
template : # create pods using pod definition in this template
26
26
metadata :
27
27
labels :
28
- app : bot-son
28
+ app : watson-conversation-app
29
29
tier : frontend
30
30
spec :
31
31
containers :
32
- - name : bot-son
33
- image : jcantosz/watson
32
+ - name : watson-conversation-app
33
+ image : mycluster.icp:8500/default/conversation-simple:latest
34
34
resources :
35
35
requests :
36
36
cpu : 100m
You can’t perform that action at this time.
0 commit comments