chrisfilo/NeuroVault — pull request #27 by infocortex (2014-08-28 07:49:43+00:00)
Title: Enh/private collections

Update instructions:

1) pull the branch (everything should automerge)
2) run the south migrations: `manage.py migrate statmaps`
3) edit settings.py, configure PRIVATE_MEDIA_*
4) create a directory for `settings.PRIVATE_MEDIA_ROOT` (anywhere on filesystem)
5) move the existing `images/` upload directory to the `PRIVATE_MEDIA_ROOT`
6) ensure that existing media (anatomical image) will be served at the normal `MEDIA_ROOT`
7) configure nginx to secure the private media (be sure to enable nginx in `settings.PRIVATE_MEDIA_HEADER_REDIRECT`):
```
location /private_media_url/ {
internal;
alias /path/to/private_media_root/;
}
```
8) configure nginx to serve `STATICFILES_DIRS` and `MEDIA_ROOT` (probably already done).
9) there are just a few files/collections that are not served from the correct upload location, these can be manually re-uploaded or a quick script or db query :

| collection_id | image_name | image_file_name |
|---------------|--------------------------------|----------------------------------|
| 2 | Map | ./unthresholded_smallwood.nii.gz |
| 17 | Perception_Lateral_aPFC | ./spmT_0002.nii.gz |
| 18 | pcc_comp | ./spmT_0005_1.nii.gz |
| 17 | Memory_Medial_aPFC | ./spmT_0001.nii.gz |
| 18 | aMPFC_Task_focus | ./spmT_0003.nii.gz |
| 18 | aMPFC_Comprehension | ./spmT_0005.nii.gz |
| 17 | Memory_MedialMinusLateral_aPFC | ./spmT_0001_1.nii.gz |
| 18 | PCC_task_focus | ./spmT_0003_1.nii.gz |
| 22 | c1 | ./r3D-2D_comp1_005_108.nii.gz |
| 22 | c1_m | ./3D-2D_comp1_005_108.nii.gz |
| 22 | c2 | ./r3D-2D_comp2_005_85.nii.gz |
| 22 | c2_m | ./3D-2D_comp2_005_85_2.nii.gz |

10) enjoy private collecting :dancers: