From a512f7ef843bac39e0aae3f2561090d0190b8568 Mon Sep 17 00:00:00 2001 From: Neszt Tibor Date: Sat, 27 Feb 2021 11:25:51 +0100 Subject: [PATCH] Dockerfile added and the readme updated --- Dockerfile | 12 ++++++++++++ README.md | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4f3e6ad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:buster + +MAINTAINER Neszt Tibor + +RUN \ + apt-get update && apt-get -y upgrade && \ + apt-get -y install nodejs npm git && \ + git clone https://github.com/revolut-engineering/revolut-merchant-api-example-next-js.git /app && \ + cd /app && \ + npm install + +CMD [ "sh", "-c", "cd /app && REVOLUT_API_KEY=$api_key npm run dev" ] diff --git a/README.md b/README.md index 204c8c0..550a135 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,24 @@ $ REVOLUT_API_KEY=XXXX npm run dev Open web browser: http://localhost:3000 +## Start with Docker + +Create a Revolut Business sandbox account and api token as described in setup. + +Build the Dockerfile: + +``` +$ docker build -t my-revolut-merchant-backend . +``` + +Run the docker: + +``` +$ docker run -it --rm -p 8000:3000 -e api_key=XXXX my-revolut-merchant-backend +``` + +Open web browser: http://localhost:8000 + ## Documentation Read more in our official [developer portal](https://developer.revolut.com/docs/merchant-api/#getting-started).