File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM node:6.11.1-onbuild
2+ EXPOSE 8443
3+ RUN cp config.json-default config.json
4+ RUN openssl req \
5+ -new \
6+ -newkey rsa:4096 \
7+ -days 365 \
8+ -nodes \
9+ -x509 \
10+ -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
11+ -keyout cert.key \
12+ -out cert.pem
13+ CMD npm run solid start
Original file line number Diff line number Diff line change 2323
2424### Install
2525
26+ You can install and run the server either using Node.js directly or using
27+ [ Docker] ( https://www.docker.com/ ) . This and the following sections describe the
28+ first approach, for the second approach see the section [ use Docker] ( #use-docker )
29+ Section below.
30+
2631To install, first install [ Node] ( https://nodejs.org/en/ ) and then run the following
2732
2833``` bash
@@ -189,6 +194,27 @@ $ solid start --help
189194 -v, --verbose Print the logs to console
190195 ```
191196
197+ ## Use Docker
198+
199+ Build with:
200+
201+ ``` bash
202+ docker build -t node-solid-server .
203+ ```
204+
205+ Run with:
206+ ``` bash
207+ docker run -p 8443:8443 --name solid node-solid-server
208+ ```
209+
210+ Modify the config as follows:
211+
212+ - Copy the config to the current directory with: ` docker cp solid:/usr/src/app/config.json . `
213+ - Edit the ` config.json ` file
214+ - Copy the file back with ` docker cp config.json solid:/usr/src/app/ `
215+ - Restart the server with ` docker restart solid `
216+
217+
192218## Library Usage
193219
194220### Install Dependencies
Original file line number Diff line number Diff line change 1+ {
2+ "root": "./data",
3+ "port": "8443",
4+ "serverUri": "https://localhost:8443",
5+ "webid": true,
6+ "mount": "/",
7+ "configPath": "./config",
8+ "dbPath": "./.db",
9+ "sslKey": "./cert.key",
10+ "sslCert": "./cert.pem",
11+ "multiuser": true,
12+ "corsProxy": "/proxy"
13+ }
You can’t perform that action at this time.
0 commit comments