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).