From d08d42605997ad7140757fd69e4eb6655939e7f1 Mon Sep 17 00:00:00 2001 From: Jon Fairbanks Date: Fri, 13 Aug 2021 19:29:01 -0700 Subject: [PATCH 1/2] Prettier Config --- .dockerignore | 3 ++- .prettierignore | 13 +++++++++++++ .prettierrc | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.dockerignore b/.dockerignore index 809e0a4..d5b46a8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,4 +13,5 @@ logo.* *.jpg *.bmpr *.sample -.env* \ No newline at end of file +.env* +.prettier* \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..33582da --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +__tests__/* +.github/* +chart/* +.*ignore +.*rc +*.md +package.json +package-lock.json +build +*.yaml +*.yml +*.config.js +.env* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..fbe0e55 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true +} \ No newline at end of file From f15a09a4eab46b29e39ad2b1491955206ce9c95a Mon Sep 17 00:00:00 2001 From: Jon Fairbanks Date: Sat, 14 Aug 2021 00:30:53 -0700 Subject: [PATCH 2/2] Shields --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c03e35b..56d8464 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ A Node.js and MongoDB based listener for PayPal IPN events. -![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/fairbanksio/paypal-ipn-listener.svg) -![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/fairbanksio/paypal-ipn-listener.svg) +![GitHub Workflow Status]() ![GitHub top language](https://img.shields.io/github/languages/top/Fairbanks-io/PayPal-IPN-Listener.svg) ![Docker Pulls](https://img.shields.io/docker/pulls/fairbanksio/paypal-ipn-listener.svg) -![GitHub](https://img.shields.io/github/license/Fairbanks-io/PayPal-IPN-Listener.svg) ![GitHub last commit](https://img.shields.io/github/last-commit/Fairbanks-io/PayPal-IPN-Listener.svg) +![Lines of code](https://img.shields.io/tokei/lines/github/jonfairbanks/docker-node-init) +![License](https://img.shields.io/github/license/Fairbanks-io/PayPal-IPN-Listener.svg) ## Getting Started @@ -46,6 +46,7 @@ The IPN listener should now be running on http://localhost:8888 This IPN Listener is also available on [Dockerhub](https://hub.docker.com/r/fairbanksio/paypal-ipn-listener). To launch the Dockerfile, the following can be used as an example: + ```sh docker run -d -p 8888:8888 -e 'MONGO_URI=mongodb://user:password@localhost:27018/paypal' --restart unless-stopped --name 'paypal-ipn' fairbanksio/paypal-ipn-listener ``` @@ -53,17 +54,18 @@ docker run -d -p 8888:8888 -e 'MONGO_URI=mongodb://user:password@localhost:27018 The IPN listener should now be running on http://localhost:8888 If you need to get into the container for some reason, simply run the following on the Docker host: + ```sh docker exec -it paypal-ipn /bin/bash ``` ## Environment Variables -| ENV | Required? | Details | Example | -|----------------|-----------|------------------------------------------------------------------------------------------------|--------------------------------------------------| -| `MONGO_URI` | No | What Mongo instance to use. If the ENV is not provided, `mongodb://localhost/paypal` is used. | `mongodb://user:password@localhost:27018/paypal` | -| `LOG_LOCATION` | No | Override where the IPN log is written. By default the log is written into the app directory. | `/Logs/ipn.log` | -| `PORT` | No | Override the application port. Defaults to 8888. | `8889` | +| ENV | Required? | Details | Example | +| -------------- | --------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------ | +| `MONGO_URI` | No | What Mongo instance to use. If the ENV is not provided, `mongodb://localhost/paypal` is used. | `mongodb://user:password@localhost:27018/paypal` | +| `LOG_LOCATION` | No | Override where the IPN log is written. By default the log is written into the app directory. | `/Logs/ipn.log` | +| `PORT` | No | Override the application port. Defaults to 8888. | `8889` | ## Configure Nginx @@ -95,4 +97,4 @@ server { } ``` -The IPN listener should now be available on the URL configured when setting up Nginx. To complete setup, [update your IPN url](https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/) on PayPal and run a test payment with the [IPN Simulator](https://developer.paypal.com/developer/ipnSimulator/). \ No newline at end of file +The IPN listener should now be available on the URL configured when setting up Nginx. To complete setup, [update your IPN url](https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/) on PayPal and run a test payment with the [IPN Simulator](https://developer.paypal.com/developer/ipnSimulator/).