-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
112 lines (76 loc) · 3.26 KB
/
README
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Introduction
============
GeoNotes is a simple application that I am developing to learn about web-based
GIS. This is its primary purpose, so don't expect anything impressively
innovative here. Its other purposes are to store, retrieve, and share
geo-referenced digital information in a user-friendly fashion. Here are the
basic use cases:
1. Upload an arbitrary text note with associated location (a GeoNote) from a
web client to a database from a map-based interface
2. View and retrieve stored GeoNotes from a web client in a map-based interface
3. GeoNotes uploaded by one user should appear or otherwise be available on
other users' active web clients
Running GeoNotes
================
For development, you probably want to run GeoNotes on your localhost. Here's
how:
Ubuntu
------
0. Get the source:
$ git clone git://github.com/bcavagnolo/GeoNotes.git
$ cd GeoNotes
1. Install dependencies [These instructions need to be validated]
$ sudo apt-get install python-pip postgresql postgis
Fix postgis' broken UTF8 support (If you're using 1.3 or earlier) by
applying the following patch:
$ wget -O - https://code.djangoproject.com/raw-attachment/ticket/16778/postgis-adapter-2.patch \
| patch -d /usr/local/lib/python2.7/dist-packages/ -p 0
$ pip install -r requirements.txt
2. Prepare database
$ wget https://docs.djangoproject.com/en/dev/_downloads/create_template_postgis-debian.sh
$ sudo su postgres
$ bash ./create_template_postgis-debian.sh
[ This last step may fail if you already have created the postgis template ]
$ createuser -P -D -S -R geonotes
$ createdb -T template_postgis -O geonotes geonotes
$ psql geonotes
geonotes=# GRANT ALL ON TABLE spatial_ref_sys TO geonotes;
geonotes=# GRANT ALL ON TABLE geometry_columns TO geonotes;
$ exit
3. Configure GeoNotes:
This is achieved by copying config.sample.py to config.py and editing it.
4. Sync the database:
$ python manage.py syncdb
[when prompted, create super user named 'admin']
5. Run the server:
$ python manage.py runserver
Automated Staging Deploy
========================
I use and Ubuntu server on the Internet to stage GeoNotes. Let's call this
machine staging.com in these instructions.
1. Login to staging.com and set up node from source as described above
2. Set up the hudson build server. I just happen to run mine on the same
Ubuntu server, but you could run it anywhere. I'll leave it to you to
figure out how to set up hudson and create a job for GeoNotes. For your
reference, here are the commands that I have the hudson server running:
[ more to come ]
Note that I had to set the system git configuration so hudson could tag the
tree:
$ sudo git config --system user.email "hudson@localhost"
$ sudo git config --system user.name "Hudson"
Thanks to:
http://translate.google.fr/translate?hl=fr&sl=ja&tl=en&u=http%3A%2F%2Fd.hatena.ne.jp%2Fkompiro%2F20090613%2F1244873030
...for this tip.
3. Expect the app at staging.com:3000
Production Deploy
=================
[ more to come ]
Other Notes
===========
Here's how I originally started this project:
$ cd /path/to/GeoNotes
$ django-admin.py startproject src
$ cd src/
$ python manage.py startapp GeoNotes
$ cd ..
$ mv src/* ./