Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
chore(dev-setup): fix wait4ports and permission issues on /var/www/st…
Browse files Browse the repository at this point in the history
…atic (#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
  • Loading branch information
c0rydoras committed May 6, 2024
1 parent 6db1c8c commit fd826fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fd826fb

Please sign in to comment.