diff --git a/Dockerfile b/Dockerfile index 4651e30a..f15bb415 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.11.4 ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE 1 +ENV TZ="Australia/Perth" RUN wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null RUN echo "Installing Tex and System Utils." && apt-get update && apt-get install -y \ -o Acquire::Retries=4 --no-install-recommends \ @@ -22,20 +23,16 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/etc/poetry python ENV PATH="${PATH}:/etc/poetry/bin" COPY poetry.lock . COPY pyproject.toml . -# RUN pip install -r requirements.txt EXPOSE 8000 RUN poetry config virtualenvs.create false && poetry install --no-root -RUN poetry add docx2pdf COPY . ./backend -WORKDIR /usr/src/app/backend/migrator -RUN poetry install -ENV PYTHONUNBUFFERED=1 - +WORKDIR /usr/src/app/backend/spms_migrator +RUN poetry install --no-root +RUN poetry add selenium WORKDIR /usr/src/app/backend -ENV TZ="Australia/Perth" -# Add the alias command +# Add the alias commands and configure the bash file RUN echo '# Custom .bashrc modifications\n' \ 'fromdate="03.04.2023"\n' \ 'todate=$date\n' \ @@ -68,41 +65,4 @@ RUN echo '# Custom .bashrc modifications\n' \ 'alias connectold="PGPASSWORD=$OLD_PASSWORD psql -h $OLD_HOST -d $OLD_DB_NAME -U $OLD_USERNAME"\n' \ 'settz\n'>> ~/.bashrc -CMD ["gunicorn", "config.wsgi", "--bind", "0.0.0.0:8000"] - -# echo 'PS1="\n\n\[$(tput sgr0)\]\[\033[38;5;105m\]\d\[$(tput sgr0)\], \t\n\[$(tput sgr0)\]\[\033[38;5;76m\]\w\[$(tput sgr0)\]\n\[$(tput sgr0)\]\[\033[38;5;10m\]--------------------------------\[$(tput sgr0)\]\n\[$(tput sgr0)\]\[\033[38;5;14m\]>\[$(tput sgr0)\]"' >> ~/.bashrc && \ - - -# texlive-base tex-common texlive-xetex texlive-luatex tex-gyre texlive-pictures \ -# texlive-latex-base texlive-latex-recommended texlive-latex-extra \ -# texlive-fonts-recommended texlive-fonts-extra - -# RUN echo "Cleaning." && apt-get clean \ -# && (rm -rf /usr/share/texmf/source || true) &&\ -# (rm -rf /usr/share/texlive/texmf-dist/source || true) &&\ -# find /usr/share/texlive -type f -name "readme*.*" -delete &&\ -# find /usr/share/texlive -type f -name "README*.*" -delete &&\ -# (rm -rf /usr/share/texlive/release-texlive.txt || true) &&\ -# (rm -rf /usr/share/texlive/doc.html || true) &&\ -# (rm -rf /usr/share/texlive/index.html || true) &&\ -# # clean up all temporary files -# echo "Clean up all temporary files." &&\ -# apt-get clean -y &&\ -# rm -rf /var/lib/apt/lists/* &&\ -# rm -f /etc/ssh/ssh_host_* &&\ -# # delete man pages and documentation -# echo "Delete man pages and documentation." &&\ -# rm -rf /usr/share/man &&\ -# mkdir -p /usr/share/man &&\ -# find /usr/share/doc -depth -type f ! -name copyright -delete &&\ -# find /usr/share/doc -type f -name "*.pdf" -delete &&\ -# find /usr/share/doc -type f -name "*.gz" -delete &&\ -# find /usr/share/doc -type f -name "*.tex" -delete &&\ -# (find /usr/share/doc -type d -empty -delete || true) &&\ -# mkdir -p /usr/share/doc &&\ -# rm -rf /var/cache/apt/archives &&\ -# mkdir -p /var/cache/apt/archives &&\ -# rm -rf /tmp/* /var/tmp/* &&\ -# (find /usr/share/ -type f -empty -delete || true) &&\ -# (find /usr/share/ -type d -empty -delete || true) - +CMD ["gunicorn", "config.wsgi", "--bind", "0.0.0.0:8000"] \ No newline at end of file diff --git a/spms_migrator/pyproject.toml b/spms_migrator/pyproject.toml index c948f740..62d759ff 100644 --- a/spms_migrator/pyproject.toml +++ b/spms_migrator/pyproject.toml @@ -26,7 +26,7 @@ soupsieve = "^2.4.1" tqdm = "^4.65.0" tzdata = "^2023.3" pandas = "^2.0.2" -django = "^4.2.2" +django = "^4.2.3" django-environ = "^0.10.0" dj-database-url = "^2.0.0" djangorestframework = "^3.14.0"