-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
34 lines (25 loc) · 831 Bytes
/
Dockerfile
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
FROM python:3-alpine AS tweet_metric_base
ENV PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
WERKZEUG_RUN_MAIN=true \
REDIS_HOST=tweetmetric-redis \
REDIS_PORT=6379 \
DEFAULT_MAX_RESULTS=100 \
RECENT_TWEET_THRESHOLD=3600 \
REFRESH_RATE_IF_RECENT_TWEETS=600 \
REFRESH_RATE_DEFAULT=3600 \
WATCH_REFRESH_RATE=300 \
APP_TITLE=tweetmetric
COPY ./src /
RUN apk add --no-cache --virtual .build-deps build-base musl-dev && \
apk add --no-cache libstdc++ && \
pip3 install --upgrade pip && \
pip3 install -r /requirements.txt && \
apk del .build-deps
FROM tweet_metric_base AS fetch_loop
CMD [ "python3", "-u", "/fetch_loop.py" ]
FROM tweet_metric_base AS viz_server
ENV VIZ_SERVER_HOST=0.0.0.0 \
VIZ_SERVER_PORT=8080
EXPOSE 8080
CMD [ "python3", "-u", "/viz_server.py" ]