You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
3
5
```
4
6
version: "2"
5
7
services:
6
8
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"
10
18
couchdb:
11
19
image: couchdb
20
+
volumes:
21
+
- "<HOST_LOCATION>:/opt/couchdb/data" #TODO set this
22
+
- "<HOST_LOCATION>:/root/certs:ro" #TODO set this
12
23
ports:
13
24
- "5984:5984"
14
25
- "6984:6984"
@@ -19,44 +30,61 @@ services:
19
30
minio:
20
31
image: minio/minio
21
32
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
23
35
ports:
24
36
- "9000:9000"
25
37
environment:
26
38
MINIO_ACCESS_KEY: tests #TODO set this
27
39
MINIO_SECRET_KEY: testssdfasdf #TODO set this
28
40
command: server /data
29
-
30
41
```
42
+
31
43
## Setup
32
44
-[ ]`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
37
45
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.
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`.
42
65
43
66
## Syncing
67
+
44
68
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`.
45
69
46
70
For example if your server information is as follows:
47
71
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
53
77
serverurl | 127.0.0.1
54
-
port | 5984
55
-
database | opennote
78
+
port | 5984
79
+
database | opennote
56
80
57
81
then your replication url would be `http://admin:password@127.0.0.1:6984/opennote`
58
82
59
83
You will see an alert if replication is working.
60
84
61
85
## Uninstall
86
+
62
87
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