Skip to content

Commit

Permalink
Updated files
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed Oct 19, 2023
1 parent e22637c commit 9b1fd5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 47 deletions.
52 changes: 6 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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' \
Expand Down Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion spms_migrator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9b1fd5c

Please sign in to comment.