Use new hashing of static file names.
Every time the docker image is rebuilt a random hash is chosen. Requires Pillar d560f89704e3a6f4490df57712525048c469bed2 or newer.
This commit is contained in:
@@ -56,3 +56,7 @@ ENTRYPOINT /docker-entrypoint.sh
|
||||
# Add the most-changing files as last step for faster rebuilds.
|
||||
ADD config_local.py /data/git/blender-cloud/
|
||||
ADD deploy /data/git
|
||||
RUN python3 -c "import re, secrets; \
|
||||
f = open('/data/git/blender-cloud/config_local.py', 'a'); \
|
||||
h = re.sub(r'[_.~-]', '', secrets.token_urlsafe())[:8]; \
|
||||
print(f'STATIC_FILE_HASH = {h!r}', file=f)"
|
||||
|
@@ -125,3 +125,7 @@ SMTP_TIMEOUT = 30 # timeout in seconds, https://docs.python.org/3/library/smtpl
|
||||
MAIL_RETRY = 180 # in seconds, delay until trying to send an email again.
|
||||
MAIL_DEFAULT_FROM_NAME = 'Blender Cloud'
|
||||
MAIL_DEFAULT_FROM_ADDR = 'cloudsupport@blender.org'
|
||||
|
||||
# MUST be 8 characters long, see pillar.flask_extra.HashedPathConverter
|
||||
# STATIC_FILE_HASH = '12345678'
|
||||
# The value used in production is appended from Dockerfile.
|
||||
|
Reference in New Issue
Block a user