forked from alerta/docker-alerta
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (51 loc) · 1.69 KB
/
Copy pathDockerfile
File metadata and controls
65 lines (51 loc) · 1.69 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM python:3
ENV PYTHONUNBUFFERED 1
LABEL maintainer="Nick Satterly <nick.satterly@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.url="http://alerta.io" \
org.label-schema.vcs-url="https://github.com/alerta/docker-alerta" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0.0-rc.1"
RUN apt-get update && apt-get install -y \
git \
libffi-dev \
libpq-dev \
mongodb-clients \
nginx \
postgresql-client \
postgresql-client-common \
python3-dev \
supervisor \
wget
RUN pip install --no-cache-dir virtualenv && \
virtualenv --python=python3 /venv && \
/venv/bin/pip install uwsgi alerta alerta-server==$VERSION
ENV PATH $PATH:/venv/bin
ADD https://github.com/alerta/angular-alerta-webui/archive/master.tar.gz /tmp/web.tar.gz
RUN tar zxvf /tmp/web.tar.gz -C /tmp && \
mv /tmp/angular-alerta-webui-master/app /web && \
mv /web/config.js /web/config.js.orig
COPY wsgi.py /app/wsgi.py
COPY uwsgi.ini /app/uwsgi.ini
COPY nginx.conf /app/nginx.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stdout /var/log/nginx/error.log
RUN chgrp -R 0 /app /venv /web && \
chmod -R g=u /app /venv /web && \
useradd -u 1001 -g 0 alerta
USER 1001
ENV ALERTA_SVR_CONF_FILE /app/alertad.conf
ENV ALERTA_CONF_FILE /app/alerta.conf
ENV ALERTA_WEB_CONF_FILE /web/config.js
ENV BASE_URL /api
ENV PROVIDER basic
ENV INSTALL_PLUGINS ""
EXPOSE 8080
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
COPY supervisord.conf /app/supervisord.conf
CMD ["supervisord", "-c", "/app/supervisord.conf"]