Skip to content
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"

This commit simply changes the path where static files are generated
(STATIC_ROOT) to the "~/volatile/static" directory.
  • Loading branch information...
1 parent a971946 commit 78d9f1af754cb0ebec3f3819befd4663ab4e3b4e Louis Opter committed Feb 15, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 hellodjango/
  2. +1 −1 nginx.conf
  3. +1 −1 postinstall
2 hellodjango/
@@ -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/"
-STATIC_ROOT = '/home/dotcloud/data/static/'
+STATIC_ROOT = '/home/dotcloud/volatile/static/'
# URL prefix for static files.
# Example: ""
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 ; }
2 postinstall
@@ -1,5 +1,5 @@
python hellodjango/ syncdb --noinput
-mkdir -p /home/dotcloud/data/media /home/dotcloud/data/static
+mkdir -p /home/dotcloud/data/media /home/dotcloud/volatile/static
python hellodjango/ collectstatic --noinput

0 comments on commit 78d9f1a

Please sign in to comment.
Something went wrong with that request. Please try again.