Merge remote-tracking branch 'origin/main' into api-v1.8.0
This commit is contained in:
commit
6e5fed8d8d
18 changed files with 92 additions and 22 deletions
|
|
@ -22,5 +22,8 @@ WORKDIR /work
|
|||
COPY . .
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/.
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -16,5 +16,7 @@ WORKDIR /work
|
|||
COPY . .
|
||||
RUN mv env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -23,5 +23,7 @@ ARG envarg
|
|||
ENV ENTERPRISE_BUILD ${envarg}
|
||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||
RUN chmod +x /tini
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
ENTRYPOINT ["/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -21,12 +21,13 @@ RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o service -tags musl openrep
|
|||
FROM alpine AS entrypoint
|
||||
RUN apk upgrade busybox --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
|
||||
ENV TZ=UTC \
|
||||
FS_ULIMIT=1000 \
|
||||
FS_DIR=/mnt/efs \
|
||||
MAXMINDDB_FILE=/root/geoip.mmdb \
|
||||
UAPARSER_FILE=/root/regexes.yaml \
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb \
|
||||
UAPARSER_FILE=/home/openreplay/regexes.yaml \
|
||||
HTTP_PORT=80 \
|
||||
KAFKA_USE_SSL=true \
|
||||
KAFKA_MAX_POLL_INTERVAL_MS=400000 \
|
||||
|
|
@ -68,5 +69,6 @@ RUN if [ "$SERVICE_NAME" = "http" ]; then \
|
|||
wget https://static.openreplay.com/geoip/GeoLite2-Country.mmdb -O "$MAXMINDDB_FILE"; fi
|
||||
|
||||
|
||||
COPY --from=build /root/service /root/service
|
||||
ENTRYPOINT /root/service
|
||||
COPY --from=build /root/service /home/openreplay/service
|
||||
USER 1001
|
||||
ENTRYPOINT /home/openreplay/service
|
||||
|
|
|
|||
|
|
@ -20,5 +20,8 @@ WORKDIR /work
|
|||
COPY . .
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/.
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -16,5 +16,8 @@ WORKDIR /work
|
|||
COPY . .
|
||||
RUN mv env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -18,5 +18,8 @@ WORKDIR /work
|
|||
COPY . .
|
||||
RUN mv env.default .env && mv entrypoint_crons.sh entrypoint.sh
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -2,15 +2,19 @@ FROM node:18-alpine
|
|||
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
|
||||
RUN apk upgrade busybox --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
RUN apk add --no-cache tini git libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
|
||||
|
||||
ARG envarg
|
||||
ENV ENTERPRISE_BUILD=${envarg} \
|
||||
MAXMINDDB_FILE=/root/geoip.mmdb
|
||||
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb
|
||||
WORKDIR /work
|
||||
ADD https://static.openreplay.com/geoip/GeoLite2-Country.mmdb $MAXMINDDB_FILE
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm install
|
||||
COPY . .
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
ADD --chown=1001 https://static.openreplay.com/geoip/GeoLite2-Country.mmdb $MAXMINDDB_FILE
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD npm start
|
||||
|
|
|
|||
|
|
@ -17,3 +17,11 @@ LABEL maintainer=Rajesh<rajesh@openreplay.com>
|
|||
RUN apk upgrade busybox --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
COPY --from=builder /work/public /var/www/openreplay
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN chown -R nginx:nginx /var/cache/nginx && \
|
||||
chown -R nginx:nginx /var/log/nginx && \
|
||||
chown -R nginx:nginx /etc/nginx/conf.d && \
|
||||
touch /var/run/nginx.pid && \
|
||||
chown -R nginx:nginx /var/run/nginx.pid
|
||||
|
||||
USER nginx
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG';
|
|||
|
||||
// const ALL = 'all';
|
||||
const PER_PAGE = 10;
|
||||
const AUTOREFRESH_INTERVAL = 3 * 60 * 1000;
|
||||
const AUTOREFRESH_INTERVAL = 5 * 60 * 1000;
|
||||
var timeoutId;
|
||||
|
||||
@connect(state => ({
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ export const reduceThenFetchResource =
|
|||
filter.filters = filter.filters.map(filterMap);
|
||||
filter.limit = 10;
|
||||
filter.page = getState().getIn(['search', 'currentPage']);
|
||||
const forceFetch = filter.filters.length === 0;
|
||||
|
||||
// duration filter from local storage
|
||||
if (!filter.filters.find((f) => f.type === FilterKey.DURATION)) {
|
||||
|
|
@ -172,7 +173,7 @@ export const reduceThenFetchResource =
|
|||
}
|
||||
}
|
||||
|
||||
return isRoute(ERRORS_ROUTE, window.location.pathname) ? dispatch(fetchErrorsList(filter)) : dispatch(fetchSessionList(filter));
|
||||
return isRoute(ERRORS_ROUTE, window.location.pathname) ? dispatch(fetchErrorsList(filter)) : dispatch(fetchSessionList(filter, forceFetch));
|
||||
};
|
||||
|
||||
export const edit = reduceThenFetchResource((instance) => ({
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ const reducer = (state = initialState, action = {}) => {
|
|||
switch (action.type) {
|
||||
case INIT:
|
||||
return state.set('current', Session(action.session));
|
||||
case FETCH_LIST.REQUEST:
|
||||
return action.clear ? state.set('list', List()) : state;
|
||||
// case FETCH_LIST.REQUEST:
|
||||
// return action.clear ? state.set('list', List()) : state;
|
||||
case FETCH_ERROR_STACK.SUCCESS:
|
||||
return state.set('errorStack', List(action.data.trace).map(ErrorStack)).set('sourcemapUploaded', action.data.sourcemapUploaded);
|
||||
case FETCH_LIVE_LIST.SUCCESS:
|
||||
|
|
@ -224,7 +224,7 @@ function init(session) {
|
|||
}
|
||||
|
||||
export const fetchList =
|
||||
(params = {}, clear = false, force = false) =>
|
||||
(params = {}, force = false) =>
|
||||
(dispatch, getState) => {
|
||||
if (!force) { // compare with the last fetched filter
|
||||
const oldFilters = getSessionFilter();
|
||||
|
|
@ -237,7 +237,6 @@ export const fetchList =
|
|||
return dispatch({
|
||||
types: FETCH_LIST.toArray(),
|
||||
call: (client) => client.post('/sessions/search2', params),
|
||||
clear,
|
||||
params: cleanParams(params),
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,5 +10,7 @@ COPY package.json .
|
|||
COPY package-lock.json .
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD npm start
|
||||
|
|
|
|||
|
|
@ -107,8 +107,12 @@ sed_i_wrapper -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"$(randomPa
|
|||
sed_i_wrapper -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"$(randomPass)\"/g" vars.yaml
|
||||
sed_i_wrapper -i "s/domainName: \"\"/domainName: \"${DOMAIN_NAME}\"/g" vars.yaml
|
||||
|
||||
info "Setting proper permission for shared folder"
|
||||
sudo mkdir -p /openreplay/storage/nfs
|
||||
sudo chown -R 1001:1001 /openreplay/storage/nfs
|
||||
|
||||
## Installing OpenReplay
|
||||
info "Installing databases"
|
||||
info "installing databases"
|
||||
helm upgrade --install databases ./databases -n db --create-namespace --wait -f ./vars.yaml --atomic
|
||||
info "Installing application"
|
||||
info "installing application"
|
||||
helm upgrade --install openreplay ./openreplay -n app --create-namespace --wait -f ./vars.yaml --atomic
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@ serviceAccount:
|
|||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
podSecurityContext:
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
fsGroup: 1001
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@ serviceAccount:
|
|||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
podSecurityContext:
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
fsGroup: 1001
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,27 @@ nginx-ingress:
|
|||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "buster"
|
||||
|
||||
# By default http listens to 80 port, and for v1.7.0 http listens in 80
|
||||
http:
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
fsGroup: 0
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
# Running sink and storage as non root users, because of existing volume permission change will take time
|
||||
sink:
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
fsGroup: 0
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
storage:
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
fsGroup: 0
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
|
||||
ingress-nginx:
|
||||
enabled: true
|
||||
controller:
|
||||
|
|
@ -102,4 +123,5 @@ ingress-nginx:
|
|||
## for backwards compatibility consider setting the full image url via the repository value below
|
||||
## use *either* current default registry/image or repository format or installing chart by providing the values.yaml will fail
|
||||
## repository:
|
||||
tag: "v1.2.1"
|
||||
tag: "v1.3.0"
|
||||
digest: ""
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
FROM node:18-alpine
|
||||
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
|
||||
RUN apk add --no-cache tini
|
||||
RUN apk upgrade busybox --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
RUN apk add --no-cache tini git libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
|
||||
|
||||
ARG envarg
|
||||
ENV ENTERPRISE_BUILD=${envarg} \
|
||||
MAXMINDDB_FILE=/root/geoip.mmdb
|
||||
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb
|
||||
WORKDIR /work
|
||||
ADD https://static.openreplay.com/geoip/GeoLite2-Country.mmdb $MAXMINDDB_FILE
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm install
|
||||
COPY . .
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
ADD --chown=1001 https://static.openreplay.com/geoip/GeoLite2-Country.mmdb $MAXMINDDB_FILE
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD npm start
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue