go-pingbot/README.md

54 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2022-06-05 05:53:42 +00:00
# [Pingbot](https://pingbot.vercel.app) - Backend
2021-07-11 21:19:37 +00:00
2021-11-10 13:38:54 +00:00
[![Repo Size](https://img.shields.io/github/repo-size/MedzikUser/go-pingbot)](https://github.com/medzikuser/go-pingbot)
[![Build](https://img.shields.io/github/workflow/status/MedzikUser/go-pingbot/release/main)](https://github.com/medzikuser/go-pingbot/actions/workflows/release.yml)
2021-08-20 14:06:29 +00:00
This application "pings" websites every few minutes (to be set in config). It can be used to keep the application alive on e.g. [glitch.me](https://glitch.com/) or [repl.it](https://replit.com/).
2021-08-17 21:26:19 +00:00
2021-08-23 19:19:44 +00:00
## ⚡ Install Pre-Compile binary
2021-07-11 21:19:37 +00:00
2021-08-20 14:06:29 +00:00
* 💻 Linux amd64
2021-11-10 13:38:54 +00:00
* [Download](https://github.com/medzikuser/go-pingbot/releases) latest version
* Unpack file `tar xf pingbot_*_linux_amd64.tar.xz`
2021-08-22 10:04:12 +00:00
* Done your binary is `pingbot.out`
2021-08-23 19:19:44 +00:00
## 👨‍💻 Compile from Source Code
‼️ Not recommended because automatic updates don't work
2021-08-22 10:04:12 +00:00
2021-08-23 19:19:44 +00:00
### 🖥️ Requirements
2021-08-22 10:04:12 +00:00
* [Go](https://golang.org/dl) (recommended latest version)
2021-08-23 19:19:44 +00:00
### ⭐ Compile
2021-08-22 10:04:12 +00:00
2021-11-30 21:15:12 +00:00
Method 1:
2021-11-10 13:38:54 +00:00
* `go install github.com/medzikuser/go-pingbot@latest`
* Output binary path
* Check GOPATH `go env GOPATH`
* Go to GOPATH and binary name is `pingbot`
Method 2:
* Download source code `git clone https://github.com/medzikuser/go-pingbot.git --depth 1`
2021-08-22 10:04:12 +00:00
* Go to folder with source code `cd go-pingbot`
2021-10-23 09:53:11 +00:00
* Build `make` or `go build -o pingbot.out`
2021-11-10 13:38:54 +00:00
* Done your compiled binary name is `pingbot.out`
### ⭐ Cross Compile
> [Check supported OS and ARCH](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63)
* Download source code `git clone https://github.com/medzikuser/go-pingbot.git --depth 1`
* Go to folder with source code `cd go-pingbot`
* Build `make GOOS=os GOARCH=arch`
* e.g. `make GOOS=openbsd GOARCH=arm64 `
* Done your cross compiled binary name is `pingbot.out`
2021-08-22 10:04:12 +00:00
2021-08-23 19:19:44 +00:00
## ⚙️ Configurate
2021-08-22 10:04:12 +00:00
* Complete .env according to schema.env
2021-08-22 10:04:12 +00:00
* And fill in config.toml according to config.schema.toml
2021-08-23 19:19:44 +00:00
## 🔧 Run
2021-08-22 10:04:12 +00:00
2021-08-31 18:18:36 +00:00
* `./pingbot.out` or `./start.sh` (auto restart e.g. if exit on update is enabled)