Skip to content

Commit

Permalink
Add Dockerfile and instructions on how to use it in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfittje-ripple committed Jul 29, 2019
1 parent b7df0b4 commit 22eb765
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
node_modules
build
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:10.16.0-alpine

RUN mkdir xrp-api
WORKDIR /xrp-api
ADD . /xrp-api

RUN npm install -g -s --no-progress yarn
RUN yarn
RUN yarn run build
RUN yarn cache clean

EXPOSE 3000

CMD ["yarn", "dev"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,16 @@ In this simple tutorial, we will get our account's XRP balance, send a payment,

curl -X GET \
http://localhost:3000/v1/transactions/{TRANSACTION_ID}
### Docker Container

You can also run the service in a docker container using the Dockerfile in this repo.

1. Be sure you have done the secret_config step from the Initial Setup section.
2. Build the container.

```docker build . -t <some_tag>```
3. Run the container.

```docker run -it -p 3000:3000 -v <path_to_secret_config>/.secret_config.js:/xrp-api/.secret_config.js <some_tag>```

4. You should now be able to run the steps in the tutorial.

0 comments on commit 22eb765

Please sign in to comment.