update readme.md and Dockerfile, add LICENSE

This commit is contained in:
Dawid Wysokiński 2020-08-24 13:23:01 +02:00 committed by Kichiyaki
parent 91d98058bc
commit 3b80cf18b6
5 changed files with 55 additions and 16 deletions

View File

@ -2,10 +2,6 @@ FROM golang:alpine
RUN apk add git
ENV MODE=production
ENV GOPRIVATE=github.com/tribalwarshelp
COPY ./.netrc /root/.netrc
RUN chmod 600 /root/.netrc
WORKDIR /go/src/app
COPY . .

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 Dawid Wysokiński
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# TWHelp DC Bot
Features:
1. Coords translation
2. Near real-time notifications about conquers
3. Tribe members ordered by OD/ODA/ODD/ODS/points
## Development
**Required env variables to run this bot** (you can set them directly in your system or create .env.development file):
```
DB_USER=your_pgDb_user
DB_NAME=your_pgdb_name
DB_PORT=your_pgdb_port
DB_HOST=your_pgdb_host
DB_PASSWORD=your_pgdb_password
API_URL=your_api_url
BOT_TOKEN=your_bot_token
```
### Prerequisites
1. Golang
2. PostgreSQL database
3. Configured [API](https://github.com/tribalwarshelp/api)
### Installing
1. Clone this repo.
2. Navigate to the directory where you have cloned this repo.
3. Set required env variables directly in your system or create .env.development file.
4. go run main.go

View File

@ -129,7 +129,6 @@ func (h *handler) checkEnnoblements() {
ennoblementsByServerKey, err := h.loadEnnoblements(servers)
if err != nil {
log.Print(err)
return
}
for _, group := range groups {

View File

@ -1,11 +0,0 @@
# DC Bot
Required ENV Variables:
- DB_USER=
- DB_NAME=
- DB_PORT=
- DB_HOST=
- DB_PASSWORD=
- API_URL=
- BOT_TOKEN=