Skip to content
This repository was archived by the owner on Jun 21, 2019. It is now read-only.

Commit 1b870c2

Browse files
author
yacut
committed
add localhost build
1 parent bab2249 commit 1b870c2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ cat /etc/nginx/conf.d/kafka-rest-ui.conf
4141
echo "Building application..."
4242
yarn build
4343

44+
if [[ "${BUILD}" == "localhost" ]]; then
45+
exit 0
46+
fi
47+
4448
echo
4549
echo "Starting server..."
4650
echo "http://0.0.0.0:${HTTP_PORT}"

localhost.Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:alpine
2+
MAINTAINER nodefluent
3+
4+
ENV KAFKA_REST_UI_VERSION=0.6.3
5+
ENV REACT_APP_KAFKA_REST_URL=http://localhost:8082
6+
ENV PROXY=true
7+
ENV NODE_ENV=production
8+
ENV BUILD=localhost
9+
ENV DEBUG=-*babel*,-*eslint*,*
10+
COPY . /usr/share/nginx/kafka-rest-ui/
11+
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
12+
COPY ./nginx/kafka-rest-ui.template /etc/nginx/conf.d/kafka-rest-ui.template
13+
COPY ./nginx/kafka-rest-ui-proxy-location.template /etc/nginx/conf.d/kafka-rest-ui-proxy-location.template
14+
WORKDIR /usr/share/nginx/kafka-rest-ui/
15+
16+
RUN apk update \
17+
&& apk add --no-cache libcap bash curl nginx gettext apache2-utils \
18+
&& ln -sf /dev/stdout /var/log/nginx/access.log \
19+
&& ln -sf /dev/stderr /var/log/nginx/error.log \
20+
&& yarn install \
21+
&& /usr/share/nginx/kafka-rest-ui/entrypoint.sh \
22+
&& rm -rf /usr/share/nginx/kafka-rest-ui/node_modules/
23+
24+
STOPSIGNAL SIGTERM
25+
26+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)