瀏覽代碼

Fix media files in the docker image

master
Michael van Tellingen 8 年之前
父節點
當前提交
664858dcae
No account linked to committer's email address
共有 3 個文件被更改,包括 4 次插入2 次删除
  1. 2
    1
      Dockerfile
  2. 1
    0
      Makefile
  3. 1
    1
      sandbox/uwsgi.ini

+ 2
- 1
Dockerfile 查看文件

19
 
19
 
20
 RUN cp --remove-destination /app/src/oscar/static/oscar/img/image_not_found.jpg /app/sandbox/public/media/
20
 RUN cp --remove-destination /app/src/oscar/static/oscar/img/image_not_found.jpg /app/sandbox/public/media/
21
 
21
 
22
-CMD uwsgi --ini /app/sandbox/uwsgi.ini
22
+WORKDIR /app/sandbox/
23
+CMD uwsgi --ini uwsgi.ini

+ 1
- 0
Makefile 查看文件

23
 	sandbox/manage.py clear_index --noinput
23
 	sandbox/manage.py clear_index --noinput
24
 	sandbox/manage.py update_index catalogue
24
 	sandbox/manage.py update_index catalogue
25
 	sandbox/manage.py thumbnail cleanup
25
 	sandbox/manage.py thumbnail cleanup
26
+	sandbox/manage.py collectstatic --noinput
26
 
27
 
27
 sandbox: install build_sandbox
28
 sandbox: install build_sandbox
28
 
29
 

+ 1
- 1
sandbox/uwsgi.ini 查看文件

29
 harakiri = 30
29
 harakiri = 30
30
 harakiri-verbose = true
30
 harakiri-verbose = true
31
 
31
 
32
-static-map = /=%d../static/
32
+static-map = /media=./public/media/
33
 
33
 
34
 # Custom headers
34
 # Custom headers
35
 add-header = X-Content-Type-Options: nosniff
35
 add-header = X-Content-Type-Options: nosniff

Loading…
取消
儲存