File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
2+ .git
3+ .gitignore
4+
5+ node_modules
6+ npm-debug.log
7+
8+ dist
Original file line number Diff line number Diff line change 1+ FROM node:lts-alpine
2+
3+ ENV NODE_ENV production
4+
5+ COPY package*.json /app/mongodb-grafana/
6+
7+ WORKDIR /app/mongodb-grafana/
8+
9+ RUN npm install --production
10+
11+ # Bundle app source
12+ COPY . .
13+
14+ WORKDIR /app/mongodb-grafana/server/
15+
16+ EXPOSE 3333
17+ USER nobody
18+
19+ CMD ["node" , "/app/mongodb-grafana/server/mongodb-proxy.js" ]
Original file line number Diff line number Diff line change 1+ NAME =mongodb-grafana-proxy
2+ VERSION =$(shell cat package.json | grep version | head -1 | sed 's/.* : "\([^"]* \) ".*/\1/')
3+ PORT =3333
4+ REGISTRY_PREFIX =$(if $(REGISTRY ) ,$(addsuffix /, $(REGISTRY ) ) )
5+
6+ .PHONY : build publish
7+
8+ build :
9+ docker build -t ${NAME} :${VERSION} .
10+
11+ publish :
12+ docker tag ${NAME} :${VERSION} ${REGISTRY_PREFIX}${NAME} :${VERSION}
13+ docker push ${REGISTRY_PREFIX}${NAME} :${VERSION}
You can’t perform that action at this time.
0 commit comments