final few edits before testing

This commit is contained in:
Walter 2025-02-20 18:45:11 +01:00
parent 13cc7fbe5d
commit d0acd97618
3 changed files with 10 additions and 13 deletions

View File

@ -9,10 +9,10 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 PIP_NO_CACHE_DIR=1
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends gcc apt-get install -y --no-install-recommends gcc && \
pip install --upgrade pip && \
pip install flake8==6.0.0
RUN pip install --upgrade pip
RUN pip install flake8==6.0.0
COPY . /usr/src/app/ COPY . /usr/src/app/
RUN flake8 --ignore=E501,F401 . RUN flake8 --ignore=E501,F401 .
@ -35,8 +35,8 @@ RUN mkdir -p $HOME && \
WORKDIR $APP_HOME WORKDIR $APP_HOME
RUN apt-get update && \ RUN apk update && \
apt-get install -y --no-install-recommends netcat apk add --no-cache netcat-openbsd
COPY --from=builder /usr/src/app/wheels /wheels COPY --from=builder /usr/src/app/wheels /wheels
COPY --from=builder /usr/src/app/requirements.txt . COPY --from=builder /usr/src/app/requirements.txt .
RUN pip install --upgrade pip && \ RUN pip install --upgrade pip && \

View File

@ -1,15 +1,12 @@
#!/bin/sh #!/bin/sh
if [ "$DATABASE" = "postgres" ] echo "Waiting for postgres..."
then
echo "Waiting for postgres..."
while ! nc -z $SQL_HOST $SQL_PORT; do while ! nc -z $SQL_HOST $SQL_PORT; do
sleep 0.1 sleep 0.1
done done
echo "PostgreSQL started" echo "PostgreSQL started"
fi
python manage.py flush --no-input python manage.py flush --no-input
python manage.py migrate python manage.py migrate