-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Docker information
- Loading branch information
Showing
3 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM nginx | ||
ADD dist/ /usr/share/nginx/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,91 @@ | ||
# How to Install StoreDown | ||
|
||
We are still early days. | ||
We are still in the early days. | ||
I hope to reduce the skills required to use StoreDown. | ||
|
||
Currently you can download a [zip of the most recent release](https://github.com/FoxUSA/StoreDown/releases) and extract it in your webserver of choice(S3, Apache, NGINX, etc ....) | ||
> Remember you need to Deploy StoredDown and configure an Apache CouchDB instance. | ||
> StoreDown uses a CouchDB database to sync. | ||
> Instructions on how to setup CouchDB are at the bottom of this file. | ||
> TLDR: Pick an option __AND__ configure CouchDB | ||
## Option 1: | ||
You can download a [zip of the most recent release](https://github.com/FoxUSA/StoreDown/releases) and extract it in your webserver of choice(S3, Apache, NGINX, etc ....) | ||
|
||
## Option 2: Using `docker` | ||
`docker run -d -p 8080:80 foxusa/storedown` | ||
|
||
## Option 3: Using docker-compose | ||
> If you want to use SSL/TLS skip this and go down to that section | ||
> | ||
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. | ||
``` | ||
version: "2" | ||
services: | ||
storedown: | ||
image: foxusa/storedown | ||
restart: always | ||
ports: | ||
- "80:80" | ||
couchdb: | ||
image: couchdb | ||
restart: always | ||
volumes: | ||
- "<HOST_LOCATION>:/opt/couchdb/data" #TODO set this to prevent accidentally deleting your database data | ||
ports: | ||
- "5984:5984" | ||
environment: | ||
COUCHDB_USER: user #TODO set this | ||
COUCHDB_PASSWORD: password #TODO set this | ||
``` | ||
|
||
You can then run `docker-compose up -d` to start the services. | ||
|
||
### SSL/TLS | ||
Create a folder with a SSL `private.key` and `public.crt` this gets mounted by nginx to encrypt connections. | ||
The `public.crt` file should have your servers cert and the whole cert chain appended to it. | ||
|
||
Create a nginx config file that proxies CouchDB traffic via SSL. | ||
[Here is an example you can use as is.](https://github.com/FoxUSA/OpenNote-Docker/blob/master/samples/nginx/default.conf) | ||
|
||
Mount these files using the following `docker-compose.yml` | ||
``` | ||
version: "2" | ||
services: | ||
storedown: | ||
image: foxusa/storedown | ||
restart: always | ||
volumes: | ||
- $HOST_LOCATION/certs:/root/certs:ro #TODO set this | ||
- $HOST_LOCATION/storedown.default.conf:/etc/nginx/conf.d/default.conf:ro #TODO file created above | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
- 6984:6984 #CouchDB Proxy | ||
links: | ||
- couchdb:couchdb | ||
couchdb: | ||
restart: always | ||
image: couchdb | ||
volumes: | ||
- /opt/StoreDown/couchdb:/opt/couchdb/data | ||
ports: | ||
- 5984:5984 | ||
environment: | ||
COUCHDB_USER: $user #TODO set this | ||
COUCHDB_PASSWORD: $password #TODO set this | ||
``` | ||
|
||
You can then run `docker-compose up -d` to start the services. | ||
|
||
--- | ||
|
||
### CouchDB config | ||
- [ ] Go to `http:https://$serverurl:5984/_utils/#_config/nonode@nohost/cors` and enable CORS for your domain. | ||
- [ ] Go to `http:https://$serverurl:5984/_utils/#_config/nonode@nohost` and set `require_valid_user`(`chttpd` section) to `true`. | ||
>If you are unable to get to the login screen after setting that, you can access it via `http:https://$serverurl:5984/_utils/#login` | ||
- [ ] Then open StoreDown and log in with the username, password, url, port, and database you configured. |