Merge pull request #414 from shocknet/feature/dockerize
Add new Dockerfile and usage guide
This commit is contained in:
commit
f7ca9cb17f
2 changed files with 28 additions and 20 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -1,29 +1,19 @@
|
|||
FROM node:12.18.0-alpine3.9
|
||||
FROM node:lts-alpine
|
||||
|
||||
EXPOSE 9835
|
||||
|
||||
VOLUME [ "/lnd", "/data" ]
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh
|
||||
|
||||
ADD ./package.json /usr/src/app/package.json
|
||||
ADD ./yarn.lock /usr/src/app/yarn.lock
|
||||
#RUN useradd app && \
|
||||
# mkdir -p /home/app/.lnd
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh
|
||||
RUN yarn install
|
||||
|
||||
RUN yarn
|
||||
|
||||
ADD . /usr/src/app
|
||||
RUN ls /usr/src/app
|
||||
|
||||
RUN chmod +x ./docker-start.sh
|
||||
#ADD ./tls.cert /usr/src/app/tls.cert
|
||||
#ADD ./admin.macaroon /usr/src/app/admin.macaroon
|
||||
|
||||
# && \
|
||||
# chown -R app:app /home/app && \
|
||||
# chown -R app:app /usr/src/app && \
|
||||
# chown -R app:app /start.sh
|
||||
|
||||
#ARG lnd_address
|
||||
#ENV LND_ADDR=$lnd_address
|
||||
EXPOSE 9835
|
||||
CMD ["./docker-start.sh"]
|
||||
ENTRYPOINT [ "node", "main.js" ]
|
||||
18
README.md
18
README.md
|
|
@ -11,6 +11,12 @@ This is an alpha release of the Shockwallet backend service, providing a wrapper
|
|||
|
||||
Run this service on your Lightning node and connect with a mobile device or desktop browser.
|
||||
|
||||
---
|
||||
- [Easy Installation](#easy-installation)
|
||||
- [Manual Installation](#manual-installation)
|
||||
- [Docker Usage](#docker-usage)
|
||||
- [Docker for Raspberry Pi](#docker-for-raspberry-pi)
|
||||
---
|
||||
### Easy Installation
|
||||
|
||||
For easy setup on your Laptop/Desktop, [a node wizard is available here.](https://github.com/shocknet/wizard)
|
||||
|
|
@ -47,6 +53,18 @@ yarn install
|
|||
|
||||
*Optionally, add the `-t` flag to route through a tunnel.rip webserver for zero-configuration networking. All communication between the api and wallet is end-to-end encrypted and your privacy is protected.*
|
||||
|
||||
### Docker Usage
|
||||
To run ShockAPI in a fully isolated environment you can use the Docker image
|
||||
provided on the Docker Hub and easily interact with API's CLI interface and flags.
|
||||
|
||||
Example of listing available configuration flags:
|
||||
```
|
||||
docker run --rm shockwallet/api:latest --help
|
||||
```
|
||||
Example of running an local instance:
|
||||
```
|
||||
docker run shockwallet/api:latest -h 0.0.0.0 -c
|
||||
```
|
||||
|
||||
### Docker for Raspberry Pi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue