-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
49 lines (34 loc) · 986 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG PYTHON_VERSION=3.10-slim-buster
ARG NODE_VERSION=18-bullseye
FROM node:$NODE_VERSION as node_modules
WORKDIR /opt
COPY package.json package-lock.json /opt/
RUN mkdir -p node_modules && npm install --ignore-scripts
FROM python:$PYTHON_VERSION
ARG ENVIRONMENT=production
ARG VERSION=latest
ENV PYTHONUNBUFFERED=1
ENV ADMIN_TOKEN=""
ENV DB_HOSTNAME=db
ENV DB_USERNAME=statsservice
ENV DB_PASSWORD=statsservice
WORKDIR /app
COPY requirements.txt /app/
RUN pip install gunicorn[gevent]
RUN pip install -r requirements.txt
COPY statsservice/ /app/statsservice/
COPY contrib/ /app/contrib/
COPY instance/ /app/instance/
COPY migrations/ /app/migrations/
COPY --from=node_modules /opt/node_modules/ statsservice/static/npm_components/
RUN pybabel compile -d statsservice/translations
COPY app.py .
COPY entrypoint.sh .
ENV STATSSERVICE_VERSION=latest
ENV HOST=0.0.0.0
ENV PORT=5000
ENV DEBUG=0
ENV STATS_CONFIG=docker.py
VOLUME [ "/app/var" ]
EXPOSE 5000
CMD ./entrypoint.sh