Download fonts at app startup instead
We can't bake the font into the Docker image as such, because we mount the volumes which blows away anything we have in the app tree beforehand. We could stash it somewhere in the image and then copy it from there on app startup or something, but at that point we might as well just download it as part of the app startup.
This commit is contained in:
@ -6,13 +6,6 @@ RUN mkdir /app /app/static /app/images
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Use RUN curl because ADD will re-download the file every time to make sure it
|
||||
# hasn't changed, which is exactly what we don't want
|
||||
RUN mkdir -p /app/static/fonts/source_han_sans
|
||||
RUN curl \
|
||||
https://github.com/adobe-fonts/source-han-sans/raw/release/Variable/OTC/SourceHanSans-VF.ttf.ttc \
|
||||
-o /app/static/fonts/source_han_sans/SourceHanSans-VF.ttf.ttc
|
||||
|
||||
COPY requirements.txt /app/
|
||||
RUN pip install -r requirements.txt --no-cache-dir
|
||||
RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy && apt-get clean
|
||||
|
Reference in New Issue
Block a user