-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.sdtool
39 lines (29 loc) · 1.14 KB
/
Dockerfile.sdtool
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
# SPDX-FileCopyrightText: Magenta ApS
#
# SPDX-License-Identifier: MPL-2.0
FROM python:3.11
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get -y install unixodbc-dev freetds-dev unixodbc tdsodbc libkrb5-dev libmariadb-dev
# These need to be installed manually ALL THE TIME for debugging, so let's
# include them here for now until we have a more stable application
RUN apt -y install vim sqlite3 screen
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
POETRY_HOME=/opt/poetry \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_VERSION=1.3.1
RUN curl -sSL https://install.python-poetry.org | python3 -
COPY pyproject.toml poetry.lock ./
RUN POETRY_NO_INTERACTION=1 /opt/poetry/bin/poetry install --no-root --no-dev
COPY sdlon ./sdlon
COPY db ./db
COPY sdtool ./sdtool
# These are not used but have to be there... don't worry about it - it's just DIPEX...
ENV SD_GLOBAL_FROM_DATE=2000-01-01
ENV SD_IMPORT_RUN_DB=/not/used
ENV SD_JOB_FUNCTION=EmploymentName
ENV SD_MONTHLY_HOURLY_DIVIDE=1
ENV APP_DBPASSWORD=not_used
ENV SD_PERSIST_PAYLOADS=false
ENV TZ="Europe/Copenhagen"
CMD ["uvicorn", "sdtool.main:app", "--host", "0.0.0.0", "--port", "80"]