Przeglądaj źródła

Fix media files in the docker image

master
Michael van Tellingen 8 lat temu
rodzic
commit
664858dcae
No account linked to committer's email address
3 zmienionych plików z 4 dodań i 2 usunięć
  1. 2
    1
      Dockerfile
  2. 1
    0
      Makefile
  3. 1
    1
      sandbox/uwsgi.ini

+ 2
- 1
Dockerfile Wyświetl plik

@@ -19,4 +19,5 @@ RUN make build_sandbox
19 19
 
20 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 Wyświetl plik

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

+ 1
- 1
sandbox/uwsgi.ini Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz