Skip to content

Commit

Permalink
πŸ“š Update docs (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Srul1k committed Aug 2, 2023
1 parent 23a4a46 commit 9a8cc26
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 11 deletions.
15 changes: 9 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="../res/logo.png"
<img src="https://raw.githubusercontent.com/cum-foundations/tdpdne-telegram-bot/master/res/logo.png"
height="148">
</p>

Expand Down Expand Up @@ -38,9 +38,9 @@
<details>
<summary> ▢️ How to run</summary>

- 🐳 [I'm familiar with Docker](how-to-run-with-docker.md)
- 🐳 [I'm familiar with Docker](https://github.com/cum-foundations/tdpdne-telegram-bot/blob/master/docs/how-to-run-with-docker.md)

- πŸ–₯️ [I don't know what Docker is](how-to-run-without-docker.md)
- πŸ–₯️ [I don't know what Docker is](https://github.com/cum-foundations/tdpdne-telegram-bot/blob/master/docs/how-to-run-without-docker.md)

</details>

Expand All @@ -49,7 +49,7 @@

<br>

![Usage Example](../res/description-photo.gif)
![Usage Example](https://github.com/cum-foundations/tdpdne-telegram-bot/blob/master/res/usage-example.gif)

</details>

Expand All @@ -58,8 +58,11 @@

<br>

*If you are not burdened and would like to help us practice [escapism](https://en.wikipedia.org/wiki/Escapism), we would be grateful for donations:*
*If you are not burdened and would like to help us practice [escapism](https://en.wikipedia.org/wiki/Escapism), we would be grateful for donations.*

πŸ’Ž**Toncoin:** ```EQAq7lYMaMFPcnSvNe5V9XSPtaQy4J2YNMYArGRi3w-VrsuM```
### πŸ’ŽToncoin
```bash
EQAq7lYMaMFPcnSvNe5V9XSPtaQy4J2YNMYArGRi3w-VrsuM
```

</details>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# πŸ”§ How to configure *appsettings.json*
# πŸ”§ How to configure

## BotConfiguration section

Expand All @@ -11,6 +11,20 @@
* `"Donations": "{DONATIONS}"`
Replace `{DONATIONS}` with your donations details

### Markdown support

Properties `"BotToken"` and `"Suppor"` support Markdown.
You can make the text **Bold**, *Italics*, add an external [link](https://youtu.be/dQw4w9WgXcQ?autoplay=1) and new lines:

* `*` for `*bold text*`
* `_` for `_italics text_`
* `[]()` for `[text](external-link)`
* `\n` for new line

#### ⚠️ About new lines
For *settings files*, **use an additional backslash** to escape the backslash (`\\n`).
For *environment variables*, save it with a single backslash.

## WrapperConfiguration section *(πŸ’‘ not necessary to update)*

* `TDPDNEApiUrl`
Expand Down
34 changes: 31 additions & 3 deletions docs/how-to-run-with-docker.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 🐳 How to run with Docker

## ⏩ Quick start
## πŸ’¦ Quick start

1. ***Pull*** the latest image
```bash
docker pull ghcr.io/cum-foundations/tdpdne-telegram-bot
docker pull ghcr.io/cum-foundations/tdpdne-telegram-bot:latest
```

1.1 ***Tag*** pulled image with a convinient name
Expand All @@ -15,9 +15,37 @@
```
2. **Run** a new container
```bash
docker run -d -e BotConfiguration__Support="your-contact-information" -e BotConfiguration__BotToken="your-bot-token" -e BotConfiguration__Donations="your-donations-details" --name tdpdne-quick-start tdpdne-telegram-bot
docker run -d -e BotConfiguration__Support="${your-contact-information}" -e BotConfiguration__BotToken="${your-bot-token}" -e BotConfiguration__Donations="${your-donations-details}" --name tdpdne-quick-start tdpdne-telegram-bot
```

3. ***Tell*** your friends that you love dicks

4. ***Enjoy!*** ✨

<br>

## 🏁 Running using your own Docker image build

1. ***Clone*** the repository:
```bash
git clone https://github.com/cum-foundations/tdpdne-telegram-bot.git
```

1.1 ***Configure*** [appsettings.json](how-to-configure.md) *(you can leave it as it is)*
2. ***Build*** your image:
```bash
docker build --progress=plain --no-cache -t "${your-image-name}" -f "${your-path-to-repository}\tdpdne-telegram-bot\src\TDPDNE.Telegram.Bot\Dockerfile" ${your-path-to-repository}\tdpdne-telegram-bot\src
```
3. ***Run*** a new container:

- If you have configured the [appsettings.json](how-to-configure.md) and updated BotConfiguration section:
```bash
docker run -d --name ${your-container-name} ${your-image-name}
```

- if you haven't changed the [appsettings.json](how-to-configure.md):
```bash
docker run -d -e BotConfiguration__Support="${your-contact-information}" -e BotConfiguration__BotToken="${your-bot-token}" -e BotConfiguration__Donations="${your-donations-details}" --name ${your-container-name} ${your-image-name}
```

4. Take step 3-4 of [⏩ Quick start](https://github.com/cum-foundations/tdpdne-telegram-bot/blob/master/docs/how-to-run-with-docker.md#-quick-start)
2 changes: 1 addition & 1 deletion docs/how-to-run-without-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To launch ***TDPDNE.Telegram.Bot***, you need:

1. ***Download*** the latest [release](https://github.com/cum-foundations/tdpdne-telegram-bot/releases)

2. ***Configure*** [appsettings.json](how-to-configure-appsettings-json.md)
2. ***Configure*** [appsettings.json](how-to-configure.md)

3. ***Launch*** TDPDNE.Telegram.Bot.exe
*(or [publish](https://learn.microsoft.com/en-us/dotnet/core/tutorials/publishing-with-visual-studio?pivots=dotnet-6-0) a new file to run on your OS/architecture)*
Expand Down

0 comments on commit 9a8cc26

Please sign in to comment.