Compare commits

...

2 Commits

Author SHA1 Message Date
Lukáš Kucharczyk f974f3748e Update Dockerfile 2023-01-02 18:26:24 +01:00
Lukáš Kucharczyk 381884371e Add Dockerfile 2023-01-02 18:11:43 +01:00
1 changed files with 14 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM python:3.10-slim-bullseye
RUN apt update && apt install --no-install-recommends --yes git
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv pip $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir poetry
RUN useradd --create-home --uid 1000 timetracker
RUN git clone https://git.kucharczyk.xyz/lukas/timetracker.git /home/timetracker/app
WORKDIR /home/timetracker/app
RUN chown -R timetracker /home/timetracker/app
RUN poetry install
EXPOSE 8000
USER timetracker
CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ]