diff --git a/Dockerfile b/Dockerfile index cb7d5b9..d648a1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,25 @@ -FROM python:3.11-slim-bookworm +FROM openproject/openproject:14 + +RUN apt update \ + && apt install -y \ + python3-pip \ + && apt clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old COPY requirements.txt / -RUN \ - python3 -m pip install -r requirements.txt && rm -rf ~/.cache && rm requirements.txt +RUN python3 -m pip install -r /requirements.txt \ + && rm /requirements.txt + +COPY lib /lib + +COPY docker/entrypoint.sh /entrypoint.sh + +EXPOSE 9030 +EXPOSE 80 -ADD cs[s] /app/css -ADD im[g] /app/img -ADD j[s] /app/js -ADD l10[n] /app/l10n -ADD li[b] /app/lib -WORKDIR /app/lib -ENTRYPOINT ["python3", "main.py"] +ENTRYPOINT ["bash"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..9bb4054 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# start openproject +./docker/prod/entrypoint.sh ./docker/prod/supervisord & + +# start exapp +echo "[INFO] Running exapp..." +python3 /lib/main.py \ No newline at end of file