forked from ONLYOFFICE/Docker-Docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.balancer
37 lines (33 loc) · 1.45 KB
/
Dockerfile.balancer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM openresty/openresty:jammy as balancer
LABEL maintainer Ascensio System SIA <[email protected]>
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC \
BALANCER_WORKER_CONNECTIONS=16384 \
BALANCER_WORKER_PROCESSES=1
RUN apt-get update -y && \
apt-get install python3.10 vim -y && \
apt-get install python3-pip -y && \
luarocks install lua-cjson && \
python3 -m pip install --upgrade pip && \
pip install redis requests kubernetes && \
rm -rf /var/lib/apt/lists/* && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \
chmod +x /usr/local/bin/dumb-init && \
mkdir -p /ds_ep_observer \
/cm_observer \
/var/tmp/docs_cache \
/etc/nginx/mnt_config \
/etc/nginx/lua && \
rm -f /etc/nginx/conf.d/default.conf \
/usr/local/openresty/nginx/conf/nginx.conf
COPY scripts/ds-ep-observer.py \
scripts/ds-pod-observer.py \
/ds_ep_observer/
COPY config/balancer/conf.d/balancer-server.conf /etc/nginx/conf.d/
COPY config/balancer/conf.d/handler-server.conf /etc/nginx/conf.d/
COPY config/balancer/nginx.conf /usr/local/openresty/nginx/conf/
COPY config/balancer/lua/configuration.lua /etc/nginx/lua/
COPY config/balancer/lua/docs_balancer.lua /etc/nginx/lua/
COPY --chmod=755 balancer-docker-entrypoint.py /docker_entrypoint.py
EXPOSE 80 443
ENTRYPOINT ["dumb-init", "python3", "/docker_entrypoint.py"]