Update INSTALL.md

This commit is contained in:
AJ ONeal 2017-08-02 15:58:38 -06:00
parent de452d097d
commit 3abb247c36
1 changed files with 75 additions and 0 deletions

View File

@ -33,6 +33,14 @@ rest of this tutorial:
my_domain=example.com
```
You can purchase a domain with daplie tools
```
npm install -g git+https://git.daplie.com/Daplie/daplie-tools.git
daplie domains:search -n $my_domain
```
Subodmains
----------
@ -52,6 +60,73 @@ api.example.com
assets.example.com
```
The domains can be setup through the Daplie Desktop App or with daplie-tools
Replace `foodevice` with whatever you like to call this device
```bash
my_device=$(hostname) # i.e. foodevice
# curl https://api.oauth3.org/api/tunnel@oauth3.org/checkip
my_address=127.0.0.1
# set device address and attach primary domain
daplie devices:attach -d $my_device -n $my_domain -a $my_address
# attach all other domains with same device/address
daplie devices:attach -d foodevice -n www.example.com
daplie devices:attach -d foodevice -n api.example.com
daplie devices:attach -d foodevice -n assets.example.com
daplie devices:attach -d foodevice -n cloud.example.com
daplie devices:attach -d foodevice -n api.cloud.example.com
```
Initialization
--------------
needs to know its primary domain
```
POST https://api.<domain.tld>/api/walnut@daplie.com/init
{ "domain": "<domain.tld>" }
```
Example `/etc/goldilocks/goldilocks.yml`:
```yml
tls:
email: domains@example.com
servernames:
- example.com
- www.example.com
- api.example.com
- assets.example.com
- cloud.example.com
- api.cloud.example.com
http:
trust_proxy: true
modules:
- name: proxy
domains:
- '*'
address: '127.0.0.1:3000'
```
Resetting the Initialization
----------------------------
Once you run the app the initialization files will appear in these locations
```
/srv/walnut/var/com.daplie.walnut.config.sqlite3
/srv/walnut/config/<domain.tld>/config.json
```
Deleting those files and restarting walnut will reset it to its bootstrap state.
Basic Walnut Install
--------------------