Commit | Line | Data |
---|---|---|
473a4431 CAW |
1 | .. MediaGoblin Documentation |
2 | ||
3 | Written in 2011, 2012 by MediaGoblin contributors | |
4 | ||
5 | To the extent possible under law, the author(s) have dedicated all | |
6 | copyright and related and neighboring rights to this software to | |
7 | the public domain worldwide. This software is distributed without | |
8 | any warranty. | |
9 | ||
10 | You should have received a copy of the CC0 Public Domain | |
11 | Dedication along with this software. If not, see | |
12 | <http://creativecommons.org/publicdomain/zero/1.0/>. | |
13 | ||
ccff46ab CAW |
14 | .. _configuration-chapter: |
15 | ||
16 | ======================== | |
17 | Configuring MediaGoblin | |
18 | ======================== | |
19 | ||
20 | So! You've got MediaGoblin up and running, but you need to adjust | |
21 | some configuration parameters. Well you've come to the right place! | |
22 | ||
0c8e20cf | 23 | |
ccff46ab CAW |
24 | MediaGoblin's config files |
25 | ========================== | |
26 | ||
27 | When configuring MediaGoblin, there are two files you might want to | |
28 | make local modified versions of, and one extra file that might be | |
29 | helpful to look at. Let's examine these. | |
30 | ||
31 | mediagoblin.ini | |
506f1f07 | 32 | This is the config file for MediaGoblin, the application. If you want to |
ccff46ab CAW |
33 | tweak settings for MediaGoblin, you'll usually tweak them here. |
34 | ||
35 | paste.ini | |
076bf0cf WKG |
36 | This is primarily a server configuration file, on the Python side |
37 | (specifically, on the WSGI side, via `paste deploy | |
9205872e CAW |
38 | <http://pythonpaste.org/deploy/>`_ / `paste script |
39 | <http://pythonpaste.org/script/>`_). It also sets up some | |
40 | middleware that you can mostly ignore, except to configure | |
41 | sessions... more on that later. If you are adding a different | |
076bf0cf | 42 | Python server other than fastcgi / plain HTTP, you might configure |
506f1f07 | 43 | it here. You probably won't need to change this file very much. |
9205872e CAW |
44 | |
45 | ||
46 | There's one more file that you certainly won't change unless you're | |
47 | making coding contributions to mediagoblin, but which can be useful to | |
48 | read and reference: | |
49 | ||
50 | mediagoblin/config_spec.ini | |
51 | This file is actually a specification for mediagoblin.ini itself, as | |
52 | a config file! It defines types and defaults. Sometimes it's a | |
49fca84b | 53 | good place to look for documentation... or to find that hidden |
9205872e | 54 | option that we didn't tell you about. :) |
ccff46ab CAW |
55 | |
56 | ||
57 | Making local copies | |
58 | =================== | |
59 | ||
49fca84b JC |
60 | Let's assume you're doing the virtualenv setup described elsewhere in this |
61 | manual, and you need to make local tweaks to the config files. How do you do | |
62 | that? Let's see. | |
07913ec9 | 63 | |
076bf0cf | 64 | To make changes to mediagoblin.ini :: |
07913ec9 | 65 | |
076bf0cf | 66 | cp mediagoblin.ini mediagoblin_local.ini |
07913ec9 | 67 | |
076bf0cf WKG |
68 | To make changes to paste.ini :: |
69 | ||
70 | cp paste.ini paste_local.ini | |
07913ec9 CAW |
71 | |
72 | From here you should be able to make direct adjustments to the files, | |
73 | and most of the commands described elsewhere in this manual will "notice" | |
74 | your local config files and use those instead of the non-local version. | |
75 | ||
076bf0cf WKG |
76 | .. note:: |
77 | ||
78 | Note that all commands provide a way to pass in a specific config | |
79 | file also, usually by a ``-cf`` flag. | |
80 | ||
ccff46ab CAW |
81 | |
82 | Common changes | |
83 | ============== | |
84 | ||
14fbfd18 CAW |
85 | Enabling email notifications |
86 | ---------------------------- | |
87 | ||
0c8e20cf | 88 | You'll almost certainly want to enable sending email. By default, |
14fbfd18 | 89 | MediaGoblin doesn't really do this... for the sake of developer |
0c8e20cf WKG |
90 | convenience, it runs in "email debug mode". |
91 | ||
92 | To make MediaGoblin send email, you need a mailer daemon. | |
93 | ||
94 | Change this in your ``mediagoblin.ini`` file:: | |
14fbfd18 | 95 | |
076bf0cf | 96 | email_debug_mode = false |
14fbfd18 | 97 | |
0c8e20cf WKG |
98 | You should also change the "from" email address by setting |
99 | ``email_sender_address``. For example:: | |
14fbfd18 | 100 | |
0c8e20cf | 101 | email_sender_address = "foo@example.com" |
14fbfd18 CAW |
102 | |
103 | If you have more custom SMTP settings, you also have the following | |
104 | options at your disposal, which are all optional, and do exactly what | |
105 | they sound like. | |
106 | ||
076bf0cf WKG |
107 | - email_smtp_host |
108 | - email_smtp_port | |
109 | - email_smtp_user | |
110 | - email_smtp_pass | |
ccff46ab | 111 | |
11f0e2f8 JT |
112 | Changing data directory |
113 | ----------------------- | |
114 | ||
115 | MediaGoblin by default stores your data in wherever ``data_basedir``. | |
116 | This can be changed by changing the value in your ``mediagoblin.ini`` file | |
117 | for example:: | |
118 | ||
119 | [DEFAULT] | |
120 | data_basedir = "/var/mediagoblin/user_data" | |
121 | ||
122 | For efficiency reasons MediaGoblin doesn't serve these files itself and | |
123 | instead leaves that to the webserver. You will have to alter the location | |
124 | to match the path in ``data_basedir``. | |
125 | ||
126 | If you use ``lazyserver.sh`` you need to change the ``paste.ini`` file:: | |
127 | ||
128 | [app:mediagoblin] | |
129 | /mgoblin_media = /var/mediagoblin/user_data | |
130 | ||
131 | If you use nginx you need to change the config:: | |
132 | ||
133 | # Instance specific media: | |
134 | location /mgoblin_media/ { | |
135 | alias /var/mediagoblin/user_data; | |
136 | } | |
137 | ||
138 | Once you have done this you will need to move any existing media you had in the | |
139 | old directory to the new directory so existing media still can be displayed. | |
0c8e20cf | 140 | |
28ce1d11 CAW |
141 | All other configuration changes |
142 | ------------------------------- | |
143 | ||
076bf0cf | 144 | To be perfectly honest, there are quite a few options and we haven't had |
0c8e20cf | 145 | time to document them all. |
28ce1d11 CAW |
146 | |
147 | So here's a cop-out section saying that if you get into trouble, hop | |
3a438f5e WKG |
148 | onto IRC and we'll help you out. Details for the IRC channel is on the |
149 | `join page`_ of the website. | |
150 | ||
151 | .. _join page: http://mediagoblin.org/join/ | |
152 | ||
28ce1d11 | 153 | |
28ce1d11 | 154 | |
0c8e20cf | 155 | |
ccff46ab CAW |
156 | Celery |
157 | ====== | |
158 | ||
3a438f5e | 159 | FIXME: List Celery configuration here. |