'Overriding wagtail modeladmin templates in docker with windows and ubuntu
I'm follow this article to override modeladmin template:
templates/modeladmin/app-name/model-name/
It was overridded in windows 11 with docker, but not work in ubuntu.
I have no idea why have to use volumes to override modeladmin template and it was only work in windows?
It is also work in windows not use docker.
dockerfile
FROM python:3.8.1-slim-buster
RUN useradd wagtail
EXPOSE 8088
ENV PYTHONUNBUFFERED=1 \
PORT=8088
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
build-essential \
libpq-dev \
libmariadbclient-dev \
libjpeg62-turbo-dev \
zlib1g-dev \
libwebp-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
RUN pip install "gunicorn==20.0.4"
COPY requirements.txt /
RUN pip install -r /requirements.txt
WORKDIR /app
RUN chown wagtail:wagtail /app
COPY --chown=wagtail:wagtail . /app
USER wagtail
RUN python manage.py collectstatic --noinput --clear --no-post-process
docker-compose.yml
version: '3.8'
services:
web:
build: .
command: gunicorn web.wsgi:application --bind 0.0.0.0:8088
volumes:
- ./project/templates:/app/project/templates
ports:
- '8088:8088'
Can you give me some pointers about how to override it in ubuntu? thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
