diff --git a/app/Dockerfile b/app/Dockerfile index 302f94a..802f7ad 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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 && \ diff --git a/app/entrypoint.sh b/app/entrypoint.sh index de69381..b7840c2 100644 --- a/app/entrypoint.sh +++ b/app/entrypoint.sh @@ -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 diff --git a/docker-compose.yml b/docker-compose-example.yml similarity index 100% rename from docker-compose.yml rename to docker-compose-example.yml