feat: add isolated Docker local testing and HTTP smoke validation
This commit is contained in:
+10
-2
@@ -27,7 +27,7 @@ COPY requirements/ requirements/
|
||||
RUN pip install --user --no-warn-script-location -r requirements/production.txt
|
||||
|
||||
|
||||
FROM python:${PYTHON_VERSION} AS runtime
|
||||
FROM python:${PYTHON_VERSION} AS runtime-base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
@@ -49,7 +49,8 @@ COPY --from=builder /root/.local /home/django/.local
|
||||
COPY . .
|
||||
COPY docker/entrypoint.sh /app/docker/entrypoint.sh
|
||||
|
||||
RUN chmod +x /app/docker/entrypoint.sh \
|
||||
RUN sed -i 's/\r$//' /app/docker/entrypoint.sh \
|
||||
&& chmod +x /app/docker/entrypoint.sh \
|
||||
&& mkdir -p /app/staticfiles /app/media \
|
||||
&& chown -R django:django /app /home/django/.local
|
||||
|
||||
@@ -59,3 +60,10 @@ EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
||||
CMD ["gunicorn", "wagtailcms.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3"]
|
||||
|
||||
|
||||
FROM runtime-base AS local-test
|
||||
RUN pip install --user --no-warn-script-location --no-cache-dir -r requirements/dev.txt
|
||||
|
||||
|
||||
FROM runtime-base AS runtime
|
||||
|
||||
Reference in New Issue
Block a user