Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Generate the static files in ~/volatile instead of ~/data

With the new "Granite" builder, DotCloud applications are built in the
background while your production application is still running. When the
build is finished the old service is stopped and its "~/data" directory
is migrated to the new service.

This change in the way applications are built means that the "~/data"
directory is only accessible during the initial push of an application.
In subsequent pushes the "~/data" directory is migrated when the build
is over which means that the build can no longer modify the "~/data"
directory.

This commit simply changes the path where static files are generated
(STATIC_ROOT) to the "~/volatile/static" directory.
  • Loading branch information...
commit 78d9f1af754cb0ebec3f3819befd4663ab4e3b4e 1 parent a971946
Louis Opter authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  hellodjango/settings.py
  2. +1 −1  nginx.conf
  3. +1 −1  postinstall
View
2  hellodjango/settings.py
@@ -60,7 +60,7 @@
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = '/home/dotcloud/data/static/'
+STATIC_ROOT = '/home/dotcloud/volatile/static/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
View
2  nginx.conf
@@ -1,3 +1,3 @@
location /media/ { root /home/dotcloud/data ; }
-location /static/ { root /home/dotcloud/data ; }
+location /static/ { root /home/dotcloud/volatile ; }
View
2  postinstall
@@ -1,5 +1,5 @@
#!/bin/sh
python hellodjango/manage.py syncdb --noinput
python mkadmin.py
-mkdir -p /home/dotcloud/data/media /home/dotcloud/data/static
+mkdir -p /home/dotcloud/data/media /home/dotcloud/volatile/static
python hellodjango/manage.py collectstatic --noinput
Please sign in to comment.
Something went wrong with that request. Please try again.