-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from beatonma/4.0.2
4.0.2
- Loading branch information
Showing
41 changed files
with
612 additions
and
631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
env/ | ||
htmlcov/ | ||
docs/ | ||
dist/ | ||
build/ | ||
*.egg-info/ | ||
*.sqlite3 | ||
*.gitbundle | ||
.idea/ | ||
.git/ | ||
*.egg-info | ||
.github/ | ||
.pytest_cache/ | ||
__pycache__/ | ||
env/ | ||
env-minimum/ | ||
env-no-wagtail/ | ||
dist/ | ||
build/ | ||
wiki/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
FROM python:3.11-alpine AS common | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONBUFFERED=1 | ||
|
||
RUN apk add curl | ||
|
||
WORKDIR /var/www/static | ||
|
||
WORKDIR /tmp/src/ | ||
COPY ./mentions ./mentions | ||
COPY ./tests ./tests | ||
COPY ./pyproject.toml . | ||
COPY ./requirements.txt . | ||
COPY ./setup.cfg . | ||
COPY ./runtests.py . | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/src/requirements.txt | ||
RUN python /tmp/src/runtests.py | ||
|
||
WORKDIR /project | ||
COPY ./sample-project/requirements.txt /project | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /project/requirements.txt | ||
|
||
# Pass a random CACHEBUST value to ensure data is updated and not taken from cache. | ||
ARG CACHEBUST=0 | ||
RUN echo "CACHEBUST: $CACHEBUST" | ||
|
||
WORKDIR /project | ||
|
||
COPY ./sample-project/docker/entrypoint.sh / | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
|
||
################################################################################ | ||
FROM common AS with_celery | ||
|
||
# Install extra dependencies but remove our package - will be mounted in compose | ||
# to allow Django runserver to reload on code changes. | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install -e /tmp/src[celery,test] | ||
RUN pip uninstall -y django-wm | ||
RUN rm -r /tmp/src | ||
|
||
CMD ["python", "manage.py", "sample_app_init"] | ||
|
||
|
||
################################################################################ | ||
FROM common AS with_wagtail | ||
|
||
# Install extra dependencies but remove our package - will be mounted in compose | ||
# to allow Django runserver to reload on code changes. | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install -e /tmp/src[wagtail,test] | ||
RUN pip uninstall -y django-wm | ||
RUN rm -r /tmp/src | ||
|
||
CMD ["python", "manage.py", "wagtail_app_init"] | ||
|
||
|
||
################################################################################ | ||
FROM with_celery AS with_celery_celery | ||
|
||
ENTRYPOINT celery -A sample_project worker -l info | ||
|
||
|
||
################################################################################ | ||
FROM with_celery AS with_celery_cron | ||
|
||
COPY ./sample-project/docker/with-celery/cron-schedule / | ||
RUN crontab /cron-schedule | ||
|
||
ENTRYPOINT crond -l 2 -f | ||
|
||
|
||
################################################################################ | ||
FROM with_wagtail AS with_wagtail_cron | ||
|
||
COPY ./sample-project/docker/with-wagtail/cron-schedule / | ||
RUN crontab /cron-schedule | ||
|
||
ENTRYPOINT crond -l 2 -f |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__version__ = "4.0.1" | ||
__version__ = "4.0.2" | ||
__url__ = "https://github.com/beatonma/django-wm/" |
Oops, something went wrong.