forked from brigoldberg/alerta-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alerta-ui
34 lines (26 loc) · 1.21 KB
/
Dockerfile.alerta-ui
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
# Dockerfile for Alerta on Alpine Linux container
FROM alpine:latest
RUN apk update
RUN apk add bash supervisor nginx git gcc python3 npm
RUN apk add python3-dev linux-headers musl-dev libffi-dev
# Install Alerta
RUN pip3 install alerta
# Configure NGINX
RUN rm -f /etc/nginx/conf.d/default.conf
COPY config/nginx.conf /etc/nginx/nginx.conf
COPY config/nginx-alerta-ui.conf /etc/nginx/conf.d/alerta.conf
RUN chown nginx:nginx /etc/nginx/nginx.conf; chmod 644 /etc/nginx/nginx.conf
RUN chown nginx:nginx /etc/nginx/conf.d/alerta.conf; chmod 644 /etc/nginx/conf.d/alerta.conf
RUN mkdir -p /var/www/html; chown nginx:nginx /var/www/html
RUN mkdir -p /var/run/alerta; chown nginx:nginx /var/run/alerta
RUN mkdir -p /var/log/alerta; chown nginx:nginx /var/log/alerta
# Install proper version of Alerta front end
RUN git clone https://github.com/alerta/alerta-webui.git /alerta-webui
RUN cd /alerta-webui; npm install; npm run build
RUN cp -r /alerta-webui/dist/* /var/www/html
COPY config/config.json /var/www/html/config.json
COPY config/alerta.conf /root/.alerta.conf
# Supervisord
RUN mkdir /etc/supervisord.d
COPY config/supervisord.conf /etc/supervisord.conf
COPY config/supervisord.d/nginx.ini /etc/supervisord.d/nginx.ini