forked from alerta/docker-alerta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
54 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,70 @@ | ||
FROM python:3.6 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
LABEL maintainer="Nick Satterly <[email protected]>" \ | ||
org.label-schema.build-date=${BUILD_DATE} \ | ||
org.label-schema.url="https://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" | ||
LABEL maintainer="Nick Satterly <[email protected]>" | ||
|
||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
ENV PATH ${PATH}:/venv/bin | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.url="https://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 \ | ||
gettext-base \ | ||
git \ | ||
libffi-dev \ | ||
libldap2-dev \ | ||
libpq-dev \ | ||
libsasl2-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/v$VERSION.tar.gz /tmp/web.tar.gz | ||
RUN tar zxvf /tmp/web.tar.gz -C /tmp && \ | ||
mv /tmp/angular-alerta-webui-$VERSION/app /web && \ | ||
mv /web/config.json /web/config.json.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_CONF_FILE /app/alerta.conf | ||
ENV ALERTA_WEB_CONF_FILE /web/config.json | ||
ENV BASE_URL /api | ||
ENV INSTALL_PLUGINS "" | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV HEARTBEAT_SEVERITY major | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
gettext-base \ | ||
libffi-dev \ | ||
libldap2-dev \ | ||
libpq-dev \ | ||
libsasl2-dev \ | ||
mongodb-clients \ | ||
nginx-light \ | ||
postgresql-client \ | ||
python3-dev \ | ||
supervisor \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV FOO 2 | ||
|
||
RUN pip install --no-cache-dir virtualenv \ | ||
&& virtualenv --python=python3 /venv \ | ||
&& /venv/bin/pip install uwsgi alerta \ | ||
&& /venv/bin/pip install https://github.com/alerta/alerta/archive/fix-redirect-500.zip | ||
|
||
RUN wget -q -O - "https://github.com/alerta/angular-alerta-webui/archive/v${VERSION}.tar.gz" | tar xzf - -C /tmp/ \ | ||
&& mv /tmp/angular-alerta-webui-${VERSION}/app /web \ | ||
&& mv /web/config.json /web/config.json.orig \ | ||
&& rm -fr /tmp/angular-alerta-webui-${VERSION} | ||
|
||
COPY slash/ / | ||
|
||
RUN chgrp -R 0 /app /venv /web \ | ||
&& chmod -R g=u /app /venv /web \ | ||
&& useradd -r -d /app -u 1001 -g 0 alerta | ||
ENV BASE_URL /api | ||
ENV INSTALL_PLUGINS "" | ||
|
||
USER 1001 | ||
EXPOSE 8080 | ||
|
||
COPY config.json.template /web/config.json.template | ||
COPY docker-entrypoint.sh / | ||
COPY supervisord.conf /app/supervisord.conf | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["supervisord", "-c", "/app/supervisord.conf"] | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.