Bot Updating Documentation

pull/146/head
LinuxServer-CI 2023-09-24 14:11:48 +00:00
rodzic cd91052bf8
commit f34c129ee9
1 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -4,6 +4,10 @@ title: gmail-order-bot
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the https://github.com/lsiodev/docker-gmail-order-bot/blob/master/.github/CONTRIBUTING.md -->
# DEPRECATION NOTICE
This image is deprecated. We will not offer support for this image and it will not be updated.
# [lsiodev/gmail-order-bot](https://github.com/lsiodev/docker-gmail-order-bot)
[![Scarf.io pulls](https://scarf.sh/installs-badge/lsiodev-ci/lsiodev%2Fgmail-order-bot?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh/gateway/lsiodev-ci/docker/lsiodev%2Fgmail-order-bot)
@ -30,7 +34,7 @@ The architectures supported by this image are:
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf| ✅ | arm32v7-\<version tag\> |
| armhf | ❌ | |
## Application Setup
@ -38,7 +42,7 @@ This container is for developers only! We make pre-defined bots we use in our wo
The entire basis of this is to act as middleware between your email address receiving orders from https://checkout.linuxserver.io and send them to some external service. The bot will archive any messages that do not come from orders@nanocheckout.com with valid DKIM signatures, so definetly do not use this on a personal account.
The concept behind this bot and using email as a destination for orders is to serve normal users that simply want an email for an order out of the box and provide a free messaging queue akin to something like RabbitMQ for people that want to automate order ingestion.
The concept behind this bot and using email as a destination for orders is to serve normal users that simply want an email for an order out of the box and provide a free messaging queue akin to something like RabbitMQ for people that want to automate order ingestion.
By default we include bots we use that will be copied over on first container run, for example a simple discord ping when an order is received with the order details:
```
@ -62,9 +66,9 @@ exports.orderbot = async function(order) {
}
```
This code will be passed an order object containing all the order details parsed from the email message. Here we use custom env variables to set application settings to connect up to and send a message to discord.
This code will be passed an order object containing all the order details parsed from the email message. Here we use custom env variables to set application settings to connect up to and send a message to discord.
In order to use this bot you will need to perform the following setup steps:
In order to use this bot you will need to perform the following setup steps:
1. Create a dedicated gmail account to use for https://checkout.linuxserver.io
2. Enable API access to this Gmail account by clicking on `Enable the Gmail API` here https://developers.google.com/gmail/api/quickstart/nodejs
3. Save your credentials.json file from that action to the folder you will be bind mounting as `/config`
@ -72,7 +76,7 @@ In order to use this bot you will need to perform the following setup steps:
5. Go to the URL prompted and enter the key you get from it.
6. Start the container using the run/compose example in this readme.
When the container starts if you are using a custom bot located in `/config/bots` it will install the node modules included in it's package.json, do not use system level node modules this container is Alpine based and it will cause conflicts.
When the container starts if you are using a custom bot located in `/config/bots` it will install the node modules included in it's package.json, do not use system level node modules this container is Alpine based and it will cause conflicts.
From there the bot will loop in for your defined timeout and pull in emails and spit out orders to your destination.
@ -92,6 +96,7 @@ services:
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- BOT_NAME=discord
- LOOP_TIME=60
volumes:
@ -106,11 +111,13 @@ docker run -d \
--name=gmail-order-bot \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e BOT_NAME=discord \
-e LOOP_TIME=60 \
-v /path/to/data:/config \
--restart unless-stopped \
lscr.io/lsiodev/gmail-order-bot:latest
```
## Parameters
@ -128,6 +135,7 @@ Docker images are configured using parameters passed at runtime (such as those a
| :----: | --- |
| `PUID=1000` | for UserID - see below for explanation |
| `PGID=1000` | for GroupID - see below for explanation |
| `TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `BOT_NAME=discord` | On successful order receive send the order payload to this bot (default bots are located in root/defaults/bots) |
| `LOOP_TIME=60` | Time in seconds to reach into gmail and get new messages to process |
@ -191,4 +199,5 @@ We publish various [Docker Mods](https://github.com/lsiodev/docker-mods) to enab
## Versions
* **24.09.23:** - Deprecate.
* **06.07.20:** - Initial Release.