From fd826fb1225d5ecb609422994d0f9b3a3eac34ec Mon Sep 17 00:00:00 2001 From: Arthur D <110528300+c0rydoras@users.noreply.github.com> Date: Mon, 6 May 2024 10:49:59 +0200 Subject: [PATCH] chore(dev-setup): fix wait4ports and permission issues on /var/www/static (#1082) the permissions of /var/www/static can become an issue because we run as another user (usually 1000) so that linting/formatting doesn't mess up permissions --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index daaab412..9bb30030 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,11 +43,12 @@ WORKDIR /app RUN apk update --no-cache && \ apk add gcc python3-dev musl-dev linux-headers wait4ports && \ poetry config virtualenvs.create false && poetry install && \ - apk del gcc python3-dev musl-dev linux-headers --no-cache + apk del gcc python3-dev musl-dev linux-headers --no-cache && \ + chmod 777 /var/www/static USER 1001 -CMD ["sh", "-c", "wait4ports -s 15 tcp://${DJANGO_DATABASE_HOST:db}:${DJANGO_DATABASE_PORT:5432}; manage.py migrate --no-input && ./cmd.sh --autoreload --static"] +CMD ["sh", "-c", "wait4ports -s 15 tcp://${DJANGO_DATABASE_HOST:-db}:${DJANGO_DATABASE_PORT:-5432}; manage.py migrate --no-input && ./cmd.sh --autoreload --static"] FROM base as prod