瀏覽代碼

change owner of static files to user 1000, so Wagtail code (in uWSGI) has write access

Hourann Bosci 8 年之前
父節點
當前提交
dd76c7fb11
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Dockerfile

+ 3 - 0
Dockerfile

@@ -39,6 +39,9 @@ ENV UWSGI_VIRTUALENV=/venv UWSGI_WSGI_FILE=bakerydemo/wsgi_production.py UWSGI_H
 # Call collectstatic with dummy environment variables:
 RUN DATABASE_URL=postgres://none REDIS_URL=none /venv/bin/python manage.py collectstatic --noinput
 
+# make sure static files are writable by uWSGI process
+RUN chown -R 1000:2000 /code/bakerydemo/media
+
 # start uWSGI, using a wrapper script to allow us to easily add more commands to container startup:
 ENTRYPOINT ["/code/docker-entrypoint.sh"]
 CMD ["/venv/bin/uwsgi", "--http-auto-chunked", "--http-keepalive", "--static-map", "/media/=/code/bakerydemo/media/"]