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
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/
RUN flake8 --ignore=E501,F401 .
@ -35,8 +35,8 @@ RUN mkdir -p $HOME && \
WORKDIR $APP_HOME
RUN apt-get update && \
apt-get install -y --no-install-recommends netcat
RUN apk update && \
apk add --no-cache netcat-openbsd
COPY --from=builder /usr/src/app/wheels /wheels
COPY --from=builder /usr/src/app/requirements.txt .
RUN pip install --upgrade pip && \

View File

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