Skip to content

Commit 54d7a9f

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/dashboard into feature/create-cluster
2 parents 5d6de68 + 960e5a7 commit 54d7a9f

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

.github/workflows/pr-issue-validator.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Validate Pull Request
32

43
on:
@@ -141,4 +140,4 @@ jobs:
141140
gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
142141
gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
143142
exit 1
144-
fi
143+
fi

Dockerfile

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
FROM node:20-alpine AS builder
22

3-
RUN apk add --no-cache git
4-
53
WORKDIR /app
6-
COPY package.json .
7-
COPY yarn.lock .
84

5+
COPY package.json yarn.lock .
6+
7+
RUN apk add --no-cache git
98
RUN yarn install --frozen-lockfile --network-timeout 600000
109

11-
COPY src/ src
12-
COPY nginx.conf .
13-
COPY tsconfig.json .
14-
COPY vite.config.mts .
1510
COPY . .
1611

17-
RUN echo `git rev-parse --short=9 HEAD` > health.html
12+
RUN echo `git rev-parse --short HEAD` > health.html && \
13+
echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short HEAD)" >> .env && \
14+
yarn build
1815

19-
RUN echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short HEAD)\n" >> .env
16+
FROM fholzer/nginx-brotli:v1.26.2
2017

21-
RUN yarn build
18+
# Install bash
19+
RUN apk add --no-cache bash shadow
2220

23-
FROM nginx:stable
21+
RUN useradd -m -s /bin/bash devtron
2422

25-
RUN useradd -ms /bin/bash devtron
2623
COPY --from=builder /app/dist/ /usr/share/nginx/html
2724
COPY ./nginx.conf /etc/nginx/nginx.conf
2825
COPY ./nginx-default.conf /etc/nginx/conf.d/default.conf
26+
2927
WORKDIR /usr/share/nginx/html
30-
COPY --from=builder /app/./env.sh .
31-
COPY --from=builder /app/.env .
32-
COPY --from=builder /app/health.html .
3328

34-
RUN chown -R devtron:devtron /usr/share/nginx/html
35-
# Make our shell script executable
36-
RUN chmod +x env.sh
29+
30+
COPY --from=builder /app/env.sh .
31+
COPY --from=builder /app/.env .
32+
COPY --from=builder /app/health.html .
33+
34+
RUN chown -R devtron:devtron /usr/share/nginx/html && \
35+
chmod +x env.sh
36+
3737
USER devtron
38-
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]
38+
39+
# Override the default ENTRYPOINT to allow shell scripting as fholzer/nginx-brotli has by-default entrypoint of nginx
40+
ENTRYPOINT ["/bin/bash", "-c"]
41+
42+
CMD ["./env.sh && nginx -g 'daemon off;'"]

nginx.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ http {
2020
#tcp_nopush on;
2121
keepalive_timeout 65;
2222

23+
# gzip compression
2324
gzip on;
2425
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
2526
gzip_vary on;
@@ -28,5 +29,11 @@ http {
2829
gzip_comp_level 6;
2930
gzip_static on;
3031

32+
# btrotli compression
33+
brotli on;
34+
brotli_comp_level 6;
35+
brotli_static on;
36+
brotli_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
37+
3138
include /etc/nginx/conf.d/*.conf;
3239
}

0 commit comments

Comments
 (0)