File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed
kubernetes/docker/edgemicro Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM node:8-alpine
2+
3+ COPY install-beta.sh /tmp
4+
5+ # create user and group for microgateway
6+ RUN apk add --no-cache sed grep && \
7+ addgroup -S apigee -g 101 && \
8+ adduser -s /bin/sh -u 100 -S -G apigee apigee -h /opt/apigee
9+
10+ WORKDIR /opt/apigee
11+
12+ # copy entrypoint
13+ COPY entrypoint.sh /opt/apigee
14+
15+ ENV NODE_ENV production
16+
17+ #install and initialize microgateway
18+ RUN chmod +x /tmp/install-beta.sh && \
19+ sh /tmp/install-beta.sh && \
20+ rm -f /tmp/install-beta.sh && \
21+ deluser --remove-home node
22+
23+ VOLUME /opt/apigee/.edgemicro
24+ VOLUME /opt/apigee/logs
25+ VOLUME /opt/apigee/plugins
26+
27+ # copy tls files if needed
28+ # COPY key.pem /opt/apigee/.edgemicro
29+ # COPY cert.pem /opt/apigee/.edgemicro
30+
31+ # Expose ports
32+ EXPOSE 8000
33+ EXPOSE 8443
34+ USER apigee
35+ ENTRYPOINT ["entrypoint"]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5+
6+ if [ $# -ne 1 ]; then
7+ echo " Please provide GCP project id"
8+ exit 1
9+ fi
10+
11+ project_id=$1
12+
13+ docker build -t edgemicro:beta $DIR -f Dockerfile.beta
14+
15+ if [ $# -eq 2 ]; then
16+ docker tag edgemicro:$version gcr.io/$project_id /edgemicro:beta
17+ docker push gcr.io/$project_id /edgemicro:beta
18+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set echo off
4+
5+ chown apigee:apigee /opt/apigee && \
6+ npm install -g edgemicro@beta && \
7+ mkdir -p /opt/apigee/logs && \
8+ chown apigee:apigee /opt/apigee/logs && \
9+ mkdir -p /opt/apigee/plugins && \
10+ chown apigee:apigee /opt/apigee/plugins && \
11+ mkdir /opt/apigee/.edgemicro && \
12+ chown apigee:apigee /opt/apigee/.edgemicro && \
13+ ln -s /opt/apigee/.edgemicro /root/.edgemicro && \
14+ su - apigee -s /bin/sh -c " edgemicro init" && \
15+ chmod +x /opt/apigee/entrypoint.sh && \
16+ chown apigee:apigee /opt/apigee/entrypoint.sh && \
17+ ln -s /opt/apigee/entrypoint.sh /usr/local/bin/entrypoint
You can’t perform that action at this time.
0 commit comments