forked from lalluviamola/web-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
running_your_own_instance.txt
57 lines (39 loc) · 1.7 KB
/
running_your_own_instance.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
This document describes what you need to do to run your own copy of the blog
(the Go version in go directory).
Warning: it's probably not complete and you're expected to be able to debug
problems if they arise.
1. You need to create go/config.json with the following format:
{
"TwitterOAuthCredentials": {
"Token":"",
"Secret":""
},
"AnalyticsCode":"",
"CookieAuthKeyHexStr":"",
"CookieEncrKeyHexStr":"",
"AwsAccess":"",
"AwsSecret":"",
"S3BackupBucket":"",
"S3BackupDir":""
}
Here's what they mean and why they are there:
1.1. TwitterOAuthCredentials
This blog uses twitter to authenticate the admin (i.e. you, i.e. the user that
can create new blog posts). See handler_login.go.
To get token and secret, you need to register your blog as an app with twitter.
You also need to edit IsAdmin() in handler_login.go and change 'kjk' (which is
my twitter handle) to your twitter handle.
Alternatively, you can implement a different login system.
1.2 Analytics code is Google Analytics (UA-XXXX-Y). It's optional.
1.3. CookieAuthKeyHexStr and CookieEncrKeyHexStr are secret, but random
values used to encrypt cookies (so that they cannot be spoofed).
If empty, the code will helpfully generate values for you to put there
(see readConfig() in main.go).
1.4 This blog software has an option to backup files to s3 (see s3backup.go).
AwsAccesss, AwsSecret, S3BackupBucket and S3BackupDir define where they are
backed up.
You can leave them empty (in which case s3 backup will be disabled).
2. You need to create data directory ../../data (assuming you're in go
directory).
This is where the data (blog posts etc.) is stored. Also, this is the directory
being backed up to s3.