Skip to content

Commit

Permalink
#110 Go on diet!
Browse files Browse the repository at this point in the history
  • Loading branch information
dortegau committed Apr 10, 2019
1 parent 052c6ce commit 4ec0da7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.git/
.cache/
.eggs/
.github/
assets/
build/
dist/
prom2teams.egg-info/
tests/

.travis.yml
.gitignore
CHANGELOG.md
debug.log
logo.gif
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
FROM python:3.5-slim-stretch
FROM python:3.5-alpine

LABEL maintainer="labs@idealista.com"

EXPOSE 8089

RUN apt-get update && apt-get install -y build-essential
RUN apk add gcc libc-dev linux-headers --update-cache \
&& rm -rf /var/cache/apk/*

ADD LICENSE /opt/prom2teams/LICENSE
ADD MANIFEST.in /opt/prom2teams/MANIFEST.in
ADD README.md /opt/prom2teams/README.md
ADD requirements.txt /opt/prom2teams/requirements.txt
ADD setup.py /opt/prom2teams/setup.py
WORKDIR /opt/prom2teams

ADD ./bin /opt/prom2teams/bin
ADD ./prom2teams /opt/prom2teams/prom2teams
COPY LICENSE \
MANIFEST.in \
README.md \
requirements.txt \
setup.py \
./docker/config.ini \
./docker/replace_config.py \
./docker/prom2teams_start.sh \
./

ADD ./docker/config.ini /opt/prom2teams/config.ini
ADD ./docker/replace_config.py /opt/prom2teams/replace_config.py
ADD ./docker/prom2teams_start.sh /opt/prom2teams/prom2teams_start.sh
COPY ./bin bin
COPY ./prom2teams prom2teams

WORKDIR /opt/prom2teams
RUN python setup.py install

ENV PROM2TEAMS_PORT="8089"
Expand All @@ -28,4 +30,4 @@ ENV PROM2TEAMS_LOGLEVEL="INFO"
ENV PROM2TEAMS_CONNECTOR=""
ENV PROM2TEAMS_GROUP_ALERTS_BY=""

ENTRYPOINT ["bash", "/opt/prom2teams/prom2teams_start.sh"]
ENTRYPOINT ["sh", "prom2teams_start.sh"]
2 changes: 1 addition & 1 deletion docker/prom2teams_start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/sh
python /opt/prom2teams/replace_config.py
prom2teams --configpath /opt/prom2teams/config.ini --loglevel $PROM2TEAMS_LOGLEVEL
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
requests==2.20.1
Jinja2==2.10
Flask==1.0.2
jinja2==2.10
flask==1.0.2
flask-restplus==0.10.1
marshmallow==3.0.0b16
pyyaml==3.12
Expand Down

0 comments on commit 4ec0da7

Please sign in to comment.