2023-01-05 20:10:17 +00:00
|
|
|
FROM node as css
|
2023-01-05 20:56:57 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . /app
|
|
|
|
RUN npm install && \
|
2023-01-05 20:10:17 +00:00
|
|
|
npx tailwindcss -i ./src/input.css -o ./src/web/tracker/static/base.css --minify
|
|
|
|
|
2023-01-15 18:16:34 +00:00
|
|
|
FROM python:3.10.9-slim-bullseye
|
2023-01-05 20:10:17 +00:00
|
|
|
|
2023-01-16 18:49:41 +00:00
|
|
|
ENV VERSION_NUMBER 0.2.4
|
2023-01-05 20:56:57 +00:00
|
|
|
ENV PROD 1
|
2023-01-15 18:16:34 +00:00
|
|
|
ENV PYTHONUNBUFFERED=1
|
2023-01-05 20:10:17 +00:00
|
|
|
|
2023-01-15 18:16:34 +00:00
|
|
|
RUN apt update && \
|
|
|
|
apt install -y \
|
2023-01-07 20:58:22 +00:00
|
|
|
bash \
|
2023-01-07 20:09:47 +00:00
|
|
|
vim \
|
2023-01-15 18:16:34 +00:00
|
|
|
curl && \
|
|
|
|
apt install -y debian-keyring debian-archive-keyring apt-transport-https && \
|
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && \
|
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list && \
|
|
|
|
apt update && \
|
|
|
|
apt install caddy && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN useradd -m --uid 1000 timetracker
|
2023-01-02 17:11:43 +00:00
|
|
|
WORKDIR /home/timetracker/app
|
2023-01-03 13:29:39 +00:00
|
|
|
COPY . /home/timetracker/app/
|
|
|
|
RUN chown -R timetracker:timetracker /home/timetracker/app
|
2023-01-05 20:56:57 +00:00
|
|
|
COPY --from=css /app/src/web/tracker/static/base.css /home/timetracker/app/src/web/tracker/static/base.css
|
2023-01-03 13:29:39 +00:00
|
|
|
COPY entrypoint.sh /
|
|
|
|
RUN chmod +x /entrypoint.sh
|
2023-01-05 20:56:57 +00:00
|
|
|
|
2023-01-02 17:26:24 +00:00
|
|
|
USER timetracker
|
2023-01-05 20:56:57 +00:00
|
|
|
ENV PATH="$PATH:/home/timetracker/.local/bin"
|
|
|
|
RUN pip install --no-cache-dir poetry
|
|
|
|
RUN poetry install --without dev
|
|
|
|
|
2023-01-03 13:29:39 +00:00
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|