зеркало из https://github.com/mozilla/bedrock.git
Symlink static files.
This commit is contained in:
Родитель
2cf379005a
Коммит
ab5ba17b83
|
@ -10,8 +10,9 @@ with open(STATIC) as static_fp:
|
|||
for orig, hashed in static_files['paths'].items():
|
||||
if '?' in orig:
|
||||
continue
|
||||
orig_path = os.path.join('./static', orig)
|
||||
hashed_filename = os.path.split(hashed)[1]
|
||||
hashed_path = os.path.join('./static', hashed)
|
||||
orig_filename = os.path.split(orig)[1]
|
||||
|
||||
# no exception handling b/c we want to abort on OS errors here
|
||||
os.unlink(orig_path)
|
||||
os.symlink(hashed_filename, orig_path)
|
||||
os.unlink(hashed_path)
|
||||
os.symlink(orig_filename, hashed_path)
|
|
@ -3,11 +3,11 @@ FROM ${FROM_DOCKER_REPOSITORY}:${GIT_COMMIT}
|
|||
COPY . /app
|
||||
|
||||
RUN echo "${GIT_COMMIT}" > static/revision.txt
|
||||
RUN ./manage.py collectstatic --noinput
|
||||
RUN ./manage.py collectstatic -l --noinput
|
||||
RUN ./manage.py update_product_details
|
||||
|
||||
# Cleanup
|
||||
RUN ./docker/softlinkstatic.py
|
||||
RUN ./docker/bin/softlinkstatic.py
|
||||
|
||||
# Change User
|
||||
RUN chown webdev.webdev -R .
|
||||
|
|
Загрузка…
Ссылка в новой задаче