Skip to content

Commit 7fd79b4

Browse files
committed
Revert "chore(sre-6980): temporary changes to troubleshoot image upload"
This reverts commit 7eba783.
1 parent 68ba33b commit 7fd79b4

1 file changed

Lines changed: 113 additions & 113 deletions

File tree

workable-Dockerfile

Lines changed: 113 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,115 @@
11
FROM python:3.9-slim-bookworm
22

3-
# ENV PYTHONUNBUFFERED=1
4-
# ENV PIP_DISABLE_PIP_VERSION_CHECK=1
5-
# ENV PIP_NO_CACHE_DIR=1
6-
7-
# ARG BUILD_DATE
8-
# ARG RELEASE
9-
# ARG VERSION
10-
11-
# ENV SERVER_VERSION=${RELEASE}
12-
# ENV CLIENT_VERSION=8.5.3
13-
# ENV WEBUI_VERSION=8.7.1
14-
15-
# ENV NGINX_WORKER_PROCESSES=1
16-
# ENV NGINX_WORKER_CONNECTIONS=1024
17-
18-
# ENV UWSGI_PROCESSES=5
19-
# ENV UWSGI_LISTEN=100
20-
# ENV UWSGI_BUFFER_SIZE=8192
21-
# ENV UWSGI_MAX_WORKER_LIFETIME=30
22-
# ENV UWSGI_WORKER_LIFETIME_DELTA=3
23-
24-
# ENV HEARTBEAT_SEVERITY=major
25-
# ENV HK_EXPIRED_DELETE_HRS=2
26-
# ENV HK_INFO_DELETE_HRS=12
27-
28-
# LABEL org.opencontainers.image.description="Alerta API (prod)" \
29-
# org.opencontainers.image.created=$BUILD_DATE \
30-
# org.opencontainers.image.url="https://github.com/alerta/alerta/pkgs/container/alerta-api" \
31-
# org.opencontainers.image.source="https://github.com/alerta/alerta" \
32-
# org.opencontainers.image.version=$RELEASE \
33-
# org.opencontainers.image.revision=$VERSION \
34-
# org.opencontainers.image.licenses=Apache-2.0
35-
36-
# SHELL ["/bin/bash", "-o", "pipefail", "-c"]
37-
38-
# RUN apt-get update && \
39-
# apt-get upgrade -y && \
40-
# apt-get install -y --no-install-recommends \
41-
# build-essential \
42-
# curl \
43-
# git \
44-
# gnupg2 \
45-
# libldap2-dev \
46-
# libpq-dev \
47-
# libsasl2-dev \
48-
# postgresql-client \
49-
# python3-dev \
50-
# supervisor \
51-
# xmlsec1 && \
52-
# apt-get -y clean && \
53-
# apt-get -y autoremove && \
54-
# rm -rf /var/lib/apt/lists/*
55-
56-
# RUN curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg && \
57-
# echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ bookworm nginx" | tee /etc/apt/sources.list.d/nginx.list && \
58-
# apt-get update && \
59-
# apt-get install -y --no-install-recommends \
60-
# nginx && \
61-
# apt-get -y clean && \
62-
# apt-get -y autoremove && \
63-
# rm -rf /var/lib/apt/lists/*
64-
65-
# # hadolint ignore=DL3008
66-
# RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-archive-keyring.gpg && \
67-
# echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
68-
# apt-get update && \
69-
# apt-get install -y --no-install-recommends \
70-
# mongodb-org-shell && \
71-
# apt-get -y clean && \
72-
# apt-get -y autoremove && \
73-
# rm -rf /var/lib/apt/lists/*
74-
75-
# COPY requirements*.txt /app/
76-
77-
# # hadolint ignore=DL3013
78-
# RUN pip install --no-cache-dir pip virtualenv jinja2 && \
79-
# python3 -m venv /venv && \
80-
# /venv/bin/pip install --no-cache-dir --upgrade setuptools && \
81-
# /venv/bin/pip install --no-cache-dir --requirement /app/requirements.txt && \
82-
# /venv/bin/pip install --no-cache-dir --requirement /app/requirements-docker.txt
83-
# ENV PATH=$PATH:/venv/bin
84-
85-
# RUN /venv/bin/pip install alerta==${CLIENT_VERSION} alerta-server==${SERVER_VERSION}
86-
# COPY install-plugins.sh /app/install-plugins.sh
87-
# COPY plugins.txt /app/plugins.txt
88-
# RUN /app/install-plugins.sh
89-
90-
# ADD https://github.com/alerta/alerta-webui/releases/download/v${WEBUI_VERSION}/alerta-webui.tar.gz /tmp/webui.tar.gz
91-
# RUN tar zxvf /tmp/webui.tar.gz -C /tmp && \
92-
# mv /tmp/dist /web
93-
94-
# ENV ALERTA_SVR_CONF_FILE=/app/alertad.conf
95-
# ENV ALERTA_CONF_FILE=/app/alerta.conf
96-
# ENV ALERTA_WEB_CONF_FILE=/web/config.json
97-
98-
# COPY config/templates/app/ /app
99-
# COPY config/templates/web/ /web
100-
101-
# RUN ln -sf /dev/stdout /var/log/nginx/access.log \
102-
# && ln -sf /dev/stderr /var/log/nginx/error.log
103-
104-
# RUN chgrp -R 0 /app /venv /web && \
105-
# chmod -R g=u /app /venv /web && \
106-
# useradd -u 1001 -g 0 -d /app alerta
107-
108-
# USER 1001
109-
110-
# COPY docker-entrypoint.sh /usr/local/bin/
111-
112-
# ENTRYPOINT ["docker-entrypoint.sh"]
113-
114-
# EXPOSE 8080 1717
115-
# CMD ["supervisord", "-c", "/app/supervisord.conf"]
3+
ENV PYTHONUNBUFFERED=1
4+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
5+
ENV PIP_NO_CACHE_DIR=1
6+
7+
ARG BUILD_DATE
8+
ARG RELEASE
9+
ARG VERSION
10+
11+
ENV SERVER_VERSION=${RELEASE}
12+
ENV CLIENT_VERSION=8.5.3
13+
ENV WEBUI_VERSION=8.7.1
14+
15+
ENV NGINX_WORKER_PROCESSES=1
16+
ENV NGINX_WORKER_CONNECTIONS=1024
17+
18+
ENV UWSGI_PROCESSES=5
19+
ENV UWSGI_LISTEN=100
20+
ENV UWSGI_BUFFER_SIZE=8192
21+
ENV UWSGI_MAX_WORKER_LIFETIME=30
22+
ENV UWSGI_WORKER_LIFETIME_DELTA=3
23+
24+
ENV HEARTBEAT_SEVERITY=major
25+
ENV HK_EXPIRED_DELETE_HRS=2
26+
ENV HK_INFO_DELETE_HRS=12
27+
28+
LABEL org.opencontainers.image.description="Alerta API (prod)" \
29+
org.opencontainers.image.created=$BUILD_DATE \
30+
org.opencontainers.image.url="https://github.com/alerta/alerta/pkgs/container/alerta-api" \
31+
org.opencontainers.image.source="https://github.com/alerta/alerta" \
32+
org.opencontainers.image.version=$RELEASE \
33+
org.opencontainers.image.revision=$VERSION \
34+
org.opencontainers.image.licenses=Apache-2.0
35+
36+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
37+
38+
RUN apt-get update && \
39+
apt-get upgrade -y && \
40+
apt-get install -y --no-install-recommends \
41+
build-essential \
42+
curl \
43+
git \
44+
gnupg2 \
45+
libldap2-dev \
46+
libpq-dev \
47+
libsasl2-dev \
48+
postgresql-client \
49+
python3-dev \
50+
supervisor \
51+
xmlsec1 && \
52+
apt-get -y clean && \
53+
apt-get -y autoremove && \
54+
rm -rf /var/lib/apt/lists/*
55+
56+
RUN curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg && \
57+
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ bookworm nginx" | tee /etc/apt/sources.list.d/nginx.list && \
58+
apt-get update && \
59+
apt-get install -y --no-install-recommends \
60+
nginx && \
61+
apt-get -y clean && \
62+
apt-get -y autoremove && \
63+
rm -rf /var/lib/apt/lists/*
64+
65+
# hadolint ignore=DL3008
66+
RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-archive-keyring.gpg && \
67+
echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
68+
apt-get update && \
69+
apt-get install -y --no-install-recommends \
70+
mongodb-org-shell && \
71+
apt-get -y clean && \
72+
apt-get -y autoremove && \
73+
rm -rf /var/lib/apt/lists/*
74+
75+
COPY requirements*.txt /app/
76+
77+
# hadolint ignore=DL3013
78+
RUN pip install --no-cache-dir pip virtualenv jinja2 && \
79+
python3 -m venv /venv && \
80+
/venv/bin/pip install --no-cache-dir --upgrade setuptools && \
81+
/venv/bin/pip install --no-cache-dir --requirement /app/requirements.txt && \
82+
/venv/bin/pip install --no-cache-dir --requirement /app/requirements-docker.txt
83+
ENV PATH=$PATH:/venv/bin
84+
85+
RUN /venv/bin/pip install alerta==${CLIENT_VERSION} alerta-server==${SERVER_VERSION}
86+
COPY install-plugins.sh /app/install-plugins.sh
87+
COPY plugins.txt /app/plugins.txt
88+
RUN /app/install-plugins.sh
89+
90+
ADD https://github.com/alerta/alerta-webui/releases/download/v${WEBUI_VERSION}/alerta-webui.tar.gz /tmp/webui.tar.gz
91+
RUN tar zxvf /tmp/webui.tar.gz -C /tmp && \
92+
mv /tmp/dist /web
93+
94+
ENV ALERTA_SVR_CONF_FILE=/app/alertad.conf
95+
ENV ALERTA_CONF_FILE=/app/alerta.conf
96+
ENV ALERTA_WEB_CONF_FILE=/web/config.json
97+
98+
COPY config/templates/app/ /app
99+
COPY config/templates/web/ /web
100+
101+
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
102+
&& ln -sf /dev/stderr /var/log/nginx/error.log
103+
104+
RUN chgrp -R 0 /app /venv /web && \
105+
chmod -R g=u /app /venv /web && \
106+
useradd -u 1001 -g 0 -d /app alerta
107+
108+
USER 1001
109+
110+
COPY docker-entrypoint.sh /usr/local/bin/
111+
112+
ENTRYPOINT ["docker-entrypoint.sh"]
113+
114+
EXPOSE 8080 1717
115+
CMD ["supervisord", "-c", "/app/supervisord.conf"]

0 commit comments

Comments
 (0)