Skip to content

Commit 1bea840

Browse files
committed
Doc changes
1 parent ac2af4f commit 1bea840

File tree

5 files changed

+107
-37
lines changed

5 files changed

+107
-37
lines changed

Doc/Install.md

Lines changed: 73 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,89 @@
11
# How To Install
22
[Download most resent release from here.][Download]
33

4-
# Using Docker(Full Stack)
5-
Make sure docker in running in daemon mode with restart previously running containers on
6-
`docker -d -r` or you could louse your notes if you do not know what your doing
4+
# HTML5 based new super fancy version
5+
## Web app
6+
Just extract in a HTML5 compatible webserver public directory. Or just use the GitHub hosted version.
7+
8+
## CouchDB Install
9+
If you want sync your notes with a server, you will need to install CouchDB.
10+
[CouchDB Download page](http://couchdb.apache.org/)
11+
12+
You will need to enable CORS in CouchDB
13+
The easiest way to do this is to use `add-cors-to-couchdb`
14+
```shell
15+
npm install -g add-cors-to-couchdb
16+
add-cors-to-couchdb
17+
```
718

8-
Pull the current docker image
9-
`docker pull foxusa/opennote`
19+
Run the commands below substituting `http://127.0.0.1:5984/` with the url of your server
20+
```shell
21+
# Create DB
22+
curl -X PUT http://127.0.0.1:5984/opennote
23+
24+
# Set permissions on opennote database
25+
curl -X PUT http://localhost:5984/opennote/_security \
26+
-u admin:password \
27+
-H "Content-Type: application/json" \
28+
-d '{"admins": { "names": ["admin"], "roles": [] }, "members": { "names": ["admin"], "roles": [] } }'
29+
30+
# SSL
31+
curl -X PUT http://localhost:5984/_config/daemons/httpsd \
32+
-u admin:password \
33+
-H "Content-Type: application/json" \
34+
-d '"{couch_httpd, start_link, [https]}"'
35+
36+
mkdir /etc/couchdb/cert
37+
openssl genrsa > /etc/couchdb/cert/privkey.pem
38+
openssl req -new -x509 -key /etc/couchdb/cert/privkey.pem -out /etc/couchdb/cert/mycert.pem -days 1095
39+
40+
curl -X PUT http://127.0.0.1:5984/_config/ssl/cert_file \
41+
-u admin:password \
42+
-H "Content-Type: application/json" \
43+
-d '"/etc/couchdb/cert/mycert.pem"'
44+
45+
curl -X PUT http://127.0.0.1:5984/_config/ssl/key_file \
46+
-u admin:password \
47+
-H "Content-Type: application/json" \
48+
-d '"/etc/couchdb/cert/privkey.pem"'
49+
50+
# Default SSL port 6984
51+
```
1052

11-
and run it on port 80
12-
`sudo docker run -d -p 80:80 -p 443:443 foxusa/opennote`
53+
Now in `/OpenNote/#/settings/database/` put the following connection string in the `Replication url` field `https://admin:[email protected]:6984/opennote`
1354

14-
or if port 80 is in use
15-
`sudo docker run -d -p 8080:80 -p 8443:443 foxusa/opennote`
55+
To import a database from older versions check out `/OpenNote/#/settings/legacy/`
1656

17-
# Automatic(Wizard Based Install)
57+
# Legacy service
58+
The legacy service is still included to migrate data to the new data structure.
59+
All write endpoints have been hidden with the exception of the file upload api's.
60+
61+
### Automatic(Wizard Based Install)
1862
To run the installer open
1963
`<install path>/Service/install.php`
2064

2165
Make sure you delete `install.php` and `Config.template`.
2266

23-
### Security Note
67+
#### Security Note
2468
Be default we put the sqlite databse in the web folder. This is not a good idea. We solved this by putting in a htaccess file to not allow the database to be downloaded.
2569

2670
Still, you should move this file out of the webserver directory and change the location in `Config.php`
2771

28-
## Manual
29-
###MYSql
72+
### Using Docker(Full Stack)
73+
Make sure docker in running in daemon mode with restart previously running containers on
74+
`docker -d -r` or you could louse your notes if you do not know what your doing
75+
76+
Pull the current docker image
77+
`docker pull foxusa/opennote`
78+
79+
and run it on port 80
80+
`sudo docker run -d -p 80:80 -p 443:443 foxusa/opennote`
81+
82+
or if port 80 is in use
83+
`sudo docker run -d -p 8080:80 -p 8443:443 foxusa/opennote`
84+
85+
### Manual
86+
####MYSql
3087
- Create a MYSQL database named "OpenNote"
3188
- Download and extract OpenNote into a folder on your php web-server called "OpenNote"
3289
- Open up the `Service/model/sql` folder and run `notebook.sql` in your OpenNote database
@@ -38,10 +95,10 @@ These are stored in the following lines of code in `/OpenNote/Config.php`:
3895
$dbServer = "127.0.0.1";
3996
$dbName = "notebook";
4097
```
41-
98+
4299
- Now the site install is complete. You can now open the site by going to your webserver url +/OpenNote
43100

44-
###SQLite
101+
####SQLite
45102
- Download and extract OpenNote into a folder on your php web-server called "OpenNote"
46103
- Create a SQLite database file and execute the SQL DDL from `Service/model/sql` and run `notebook.sqlite.sql`.
47104
- Change the database connection settings inside of `Service/Config.php` to match your db settings.
@@ -59,7 +116,7 @@ Comment the following lines in the dbConfig function:
59116
```php
60117
$dbName = "../<relative path>/OpenNote.sqlite";
61118
```
62-
119+
63120
- Now the site install is complete. You can now open the site by going to your webserver url +/OpenNote
64121

65122
[Download]: https://github.com/FoxUSA/OpenNote/releases

Doc/Upgrade.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# How to upgrade
22

3+
##Upgrading from 14.07(Locomotive) to 14.07.01(Steam Locomotive) or 14.07.01(Steam Locomotive) to 14.07.02 (Diesel Locomotive).
4+
All you need to do is merge your existing deployment with the release folder while keeping your config files (`openNote\openNote.config.js` and `\Service\Config.php`).
5+
6+
###MySQL(Recomended)
7+
- Make sure you make a copy of you database and the OpenNote directory
8+
- Run `Service/model/sql/updateScript/` scripts to roll the database up to current specs.
9+
- You will copy need to copy the upload directory contents into the new upload direcory in `Service/upload`.
10+
- You will also need to put int you database information in the new config `Service/Config.php`
11+
12+
###SQLite
13+
Same as the MySQL. You may need to slightly modify the sql upload script to be compatible with SQLite. I have included as much as I can in scripts with the postfix of .sqlite.sql. SQLite does not fully support the ALTER statement.
14+
15+
316
##Docker(14.07.01 to 14.07.02)
417
Find the container id of your running container by doing a `docker ps` or `docker ps -l` if the OpenNote conatiner was the last one you stopped.
518
You should see output like this
@@ -40,7 +53,7 @@ Commit it
4053
Get another new long containerID
4154
`cf77323ed72659b3462073763e9115ff16bb4ae64ce406176703bbc781011ccb`
4255

43-
and run that with published ports
56+
and run that with published ports
4457
`sudo docker run -d -p 80:80 -p 443:443 cf77323ed72659b3462073763e9115ff16bb4ae64ce406176703bbc781011ccb /run.sh`
4558

4659
or if port 80 is in use
@@ -51,8 +64,8 @@ All done
5164

5265
##Manual installs
5366

54-
##Upgrading from 14.07(Locomotive) to 14.07.01(Steam Locomotive) or 14.07.01(Steam Locomotive) to 14.07.02 (Diesel Locomotive).
55-
All you need to do is merge your existing deployment with the release folder while keeping your config files (`openNote\openNote.config.js` and `\Service\Config.php`).
67+
##Upgrading from 14.07(Locomotive) to 14.07.01(Steam Locomotive) or 14.07.01(Steam Locomotive) to 14.07.02 (Diesel Locomotive).
68+
All you need to do is merge your existing deployment with the release folder while keeping your config files (`openNote\openNote.config.js` and `\Service\Config.php`).
5669

5770
###MySQL(Recomended)
5871
- Make sure you make a copy of you database and the OpenNote directory

OpenNote/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jacob Liscom <https://github.com/FoxUSA>"
55
],
66
"description": "A note taking software",
7-
"version": "15.06.0",
7+
"version": "15.07.0",
88
"dependencies": {
99
"jquery": "2.1.4",
1010
"bootstrap": "3.3.4",

OpenNote/openNote/openNote.config.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,46 @@
22
* Angular js config file
33
*/
44
openNote.value("config", {
5-
5+
66
/**
77
* Get current version
88
*/
99
getVersion: function(){
10-
return "15.05.00";
10+
return "15.07.00";
1111
},
12-
12+
1313
/**
14-
* Get update URL
14+
* Get update URL
1515
*/
1616
getUpdateURL: function(){
1717
return "//stardrive.us/UpdateService/?appName=OpenNote-prod";
1818
},
19-
19+
2020
/**
2121
* http path to backend rest service
2222
*/
2323
servicePath: function(){
2424
var url = localStorage.getItem("serviceURL");
2525
if(url)
2626
return url;
27-
27+
2828
return "./Service/service.php";
2929
},
30-
30+
3131
/**
3232
* Used to compute random short fade speed
3333
*/
34-
fadeSpeedShort: function(){
34+
fadeSpeedShort: function(){
3535
return 250*Math.random()+200;
3636
},
37-
37+
3838
/**
3939
* Used to compute random long fade speed
4040
*/
4141
fadeSpeedLong: function(){
4242
return 2000*Math.random()+200;
4343
},
44-
44+
4545
/**
4646
* returns help contents
4747
*/
@@ -61,17 +61,17 @@ openNote.value("config", {
6161
noteTitle: "This the note title field. In edit mode, you can use it to edit the notes title."
6262
}
6363
},
64-
64+
6565
/**
6666
* Do we want to show the help button
6767
*/
6868
showHelpButton: function(){
6969
return true;
7070
},
71-
71+
7272
/**
7373
* Get server config
74-
* return -
74+
* return -
7575
*/
7676
getServerConfig: function(){
7777
return $resource(config.servicePath()+"/config/", {}, {//{} default params
@@ -80,13 +80,13 @@ openNote.value("config", {
8080
}
8181
}).$get();
8282
},
83-
83+
8484
/**
8585
* See if we are dark or light
8686
*/
8787
isDarkTheme: function(){
8888
return false;
89-
}
89+
}
9090
});
9191

9292
/**
@@ -95,4 +95,4 @@ openNote.value("config", {
9595
*/
9696
openNote.config(function($compileProvider) {
9797
$compileProvider.aHrefSanitizationWhitelist("[\s\S]*");
98-
});
98+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "OpenNote",
3-
"version": "14.07.0",
3+
"version": "15.07.0",
44
"description": "",
55
"main": "Gruntfile.js",
66
"author": "Jacob Liscom",

0 commit comments

Comments
 (0)