-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker.k8s.Dockerfile
57 lines (39 loc) · 1.19 KB
/
docker.k8s.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
50
51
52
53
54
55
56
57
FROM python:3.10-slim
MAINTAINER [email protected]
RUN apt-get update && apt-get install -y --no-install-recommends git && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:/app:$PATH"
# update pip
RUN /usr/local/bin/python3 -m pip install --upgrade pip
# set the working directory in the container
RUN mkdir app/
WORKDIR /app
## Install dependencies
COPY app/requirements.txt .
RUN pip install wheel
RUN pip --default-timeout=240 install -r requirements.txt
RUN pip show tracardi
RUN pip list
## Copy application
COPY app app/
COPY uix uix/
# Remove test page
RUN rm -rf app/tracker/index.html
RUN rm -rf app/tracker/index.css
WORKDIR /
## Copy manual
COPY docs_old docs/
COPY mkdocs.yml /
## Install docs dependencies
RUN pip --default-timeout=240 install -r docs/requirements.txt
# Install manual
RUN mkdocs build
RUN mv site app
RUN mv docs app
WORKDIR /app
ENV VARIABLE_NAME="application"
# Set a default value for TAG_VERSION
ARG IMAGE_TAG=unknown
ENV IMAGE_TAG=${IMAGE_TAG}
CMD ["uvicorn", "app.main:application", "--proxy-headers", "--host", "0.0.0.0", "--port", "80", "--log-level", "warning"]