Skip to content

Commit a0fbd94

Browse files
committed
Finalize docs
1 parent 04ffce6 commit a0fbd94

File tree

1 file changed

+47
-19
lines changed

1 file changed

+47
-19
lines changed

docs/Install.md

+47-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
# How To Install
2+
23
Put the following text in a `docker-compose.yml`. Make sure to set all the items marked `#TODO`. Also make sure this file is in a secure place. Your credentials are stored in it.
4+
35
```
46
version: "2"
57
services:
68
opennote:
7-
image: foxusa/opennote
8-
ports:
9-
- "8080:80"
9+
image: foxusa/opennote
10+
volumes:
11+
- "<HOST_LOCATION>:/root/certs:ro"#TODO set this
12+
ports:
13+
- "80:80"
14+
- "443:443"
15+
- "6984:6984" #CouchDB Proxy
16+
links:
17+
- "couchdb:couchdb"
1018
couchdb:
1119
image: couchdb
20+
volumes:
21+
- "<HOST_LOCATION>:/opt/couchdb/data" #TODO set this
22+
- "<HOST_LOCATION>:/root/certs:ro" #TODO set this
1223
ports:
1324
- "5984:5984"
1425
- "6984:6984"
@@ -19,44 +30,61 @@ services:
1930
minio:
2031
image: minio/minio
2132
volumes:
22-
- "/tmp/data:/data" #TODO set this
33+
- "<HOST_LOCATION>:/data" #TODO set this
34+
- "<HOST_LOCATION>:/root/.minio/certs:ro" #TODO set this
2335
ports:
2436
- "9000:9000"
2537
environment:
2638
MINIO_ACCESS_KEY: tests #TODO set this
2739
MINIO_SECRET_KEY: testssdfasdf #TODO set this
2840
command: server /data
29-
3041
```
42+
3143
## Setup
3244
- [ ] `docker-compose up -d` to start
33-
- CouchDB
34-
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost/cors` and enable CORS for your domain.
35-
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost` and set `require_valid_user` to true. If you are unable to get to the login screen after setting that, you can access it via `http://$serverurl:5984/_utils/#login`
36-
- [ ] Setup SSL [via this guide](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=48203146) //TODO
3745

46+
> If you need to get into a container to configure something you can do so `docker-compose exec $container /bin/sh` IE `docker-compose exec couchdb /bin/sh`.
47+
### SSL
48+
Create a folder with a SSL `private.key` and `public.crt` this gets mounted by nginx and minio to encrypt connections.
49+
the `public.crt` file should have your servers cert and the whole cert chain appended to it.
3850

39-
- Minio
40-
- [ ] Setup SSL //TODO https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls
41-
- [ ] Create OpenNote bucket
51+
### OpenNote
52+
- [ ] (Optional) Configure SSL:
53+
Run `docker-compose exec opennote nano /etc/nginx/conf.d/default.conf` and use [this config](https://github.com/FoxUSA/OpenNote-Docker/blob/master/samples/nginx/default.conf) as a template.
54+
- [ ] Run `docker-compose exec opennote nano /etc/nginx/nginx.conf` and add this line at the end of the http block
55+
`client_max_body_size 100M;`
56+
57+
### CouchDB
58+
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost/cors` and enable CORS for your domain.
59+
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost` and set `require_valid_user` to true. If you are unable to get to the login screen after setting that, you can access it via `http://$serverurl:5984/_utils/#login`
60+
61+
### Minio
62+
- [ ] Create OpenNote bucket
63+
64+
>finally run `docker-compose restart to use the updated configurations`.
4265
4366
## Syncing
67+
4468
By default OpenNote is storing info in your browser. Until you setup syncing, you are at risk of lousing your notes. To setup syncing. From the home page click `Settings`, then click database. On the right hand side of the panel you will see a Replication url field. This expect a url to your couchDB database in the form of `$protocol://$user:$password@$serverurl:$port/$database`.
4569

4670
For example if your server information is as follows:
4771

48-
Item | Value
49-
--- | ---
50-
protocol | http
51-
user | admin
52-
password | password
72+
Item | Value
73+
--------- | ---------
74+
protocol | http
75+
user | admin
76+
password | password
5377
serverurl | 127.0.0.1
54-
port | 5984
55-
database | opennote
78+
port | 5984
79+
database | opennote
5680

5781
then your replication url would be `http://admin:password@127.0.0.1:6984/opennote`
5882

5983
You will see an alert if replication is working.
6084

6185
## Uninstall
86+
6287
If you ever want to shutdown OpenNote run `docker-compose down` in the same folder as `docker-compose.yml`. This will shut down the containers associated with OpenNote.
88+
89+
## SSL
90+
You can use lets encrypt to get a free valid SSL cert. See https://letsencrypt.org/ and their tool [Cert Bot Tool](https://certbot.eff.org/)

0 commit comments

Comments
 (0)