Skip to content

Commit

Permalink
Add the ability for the balancer to work with sentinel
Browse files Browse the repository at this point in the history
Co-authored-by: danilapog <[email protected]>
Co-committed-by: danilapog <[email protected]>
  • Loading branch information
danilapog authored and VyacheslavSemin committed Dec 12, 2024
1 parent 4b8defd commit 6b9c345
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
12 changes: 2 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ ENV COMPANY_NAME=$COMPANY_NAME \
NODE_ENV=production-linux \
NODE_CONFIG_DIR=/etc/$COMPANY_NAME/documentserver

RUN yum install sudo -y && \
RUN yum install sudo python3-pip -y && \
yum install shadow-utils -y && \
amazon-linux-extras install epel -y && \
yum install procps-ng tar wget -y && \
pip3 install redis && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_$(uname -m) && \
chmod +x /usr/local/bin/dumb-init && \
groupadd --system --gid 101 ds && \
useradd --system -g ds --no-create-home --shell /sbin/nologin --uid 101 ds && \
rm -f /var/log/*log

FROM python:2.7 AS redis-lib
RUN pip install redis==3.5.3

FROM ds-base AS ds-service
ARG TARGETARCH
ARG DS_VERSION_HASH
Expand Down Expand Up @@ -173,12 +171,6 @@ COPY --chown=ds:ds --from=ds-service \
COPY --from=ds-service \
/var/www/$COMPANY_NAME/documentserver/document-templates/new \
/var/www/$COMPANY_NAME/documentserver/document-templates/new
COPY --from=redis-lib \
/usr/local/lib/python2.7/site-packages/redis \
/usr/lib/python2.7/site-packages/redis
COPY --from=redis-lib \
/usr/local/lib/python2.7/site-packages/redis-3.5.3.dist-info \
/usr/lib/python2.7/site-packages/redis-3.5.3.dist-info
COPY docker-entrypoint.sh /usr/local/bin/
USER ds
ENTRYPOINT dumb-init docker-entrypoint.sh /var/www/$COMPANY_NAME/documentserver/server/DocService/docservice
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.balancer
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN apt-get update -y && \
apt-get install python3.10 vim -y && \
apt-get install python3-pip -y && \
luarocks install lua-cjson && \
luarocks install lua-resty-redis-connector && \
python3 -m pip install --upgrade pip && \
pip install redis requests kubernetes && \
rm -rf /var/lib/apt/lists/* && \
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile.noplugins
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ ENV COMPANY_NAME=$COMPANY_NAME \
NODE_ENV=production-linux \
NODE_CONFIG_DIR=/etc/$COMPANY_NAME/documentserver

RUN yum install sudo -y && \
RUN yum install sudo python3-pip -y && \
yum install shadow-utils -y && \
amazon-linux-extras install epel -y && \
yum install procps-ng tar wget -y && \
pip3 install redis && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_$(uname -m) && \
chmod +x /usr/local/bin/dumb-init && \
groupadd --system --gid 101 ds && \
useradd --system -g ds --no-create-home --shell /sbin/nologin --uid 101 ds && \
rm -f /var/log/*log

FROM python:2.7 AS redis-lib
RUN pip install redis==3.5.3

FROM ds-base AS ds-service
ARG TARGETARCH
ARG DS_VERSION_HASH
Expand Down Expand Up @@ -161,12 +159,6 @@ COPY --chown=ds:ds --from=ds-service \
COPY --from=ds-service \
/var/www/$COMPANY_NAME/documentserver/document-templates/new \
/var/www/$COMPANY_NAME/documentserver/document-templates/new
COPY --from=redis-lib \
/usr/local/lib/python2.7/site-packages/redis \
/usr/lib/python2.7/site-packages/redis
COPY --from=redis-lib \
/usr/local/lib/python2.7/site-packages/redis-3.5.3.dist-info \
/usr/lib/python2.7/site-packages/redis-3.5.3.dist-info
COPY docker-entrypoint.sh /usr/local/bin/
RUN mkdir -p /var/www/$COMPANY_NAME/documentserver/sdkjs-plugins
USER ds
Expand Down

0 comments on commit 6b9c345

Please sign in to comment.