This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
dataupdater/README.md

55 lines
1.1 KiB
Markdown
Raw Normal View History

2021-06-06 17:01:35 +00:00
# tribalwarshelp.com cron
2021-05-01 14:26:16 +00:00
- Adds automatically new servers.
2021-05-03 14:40:13 +00:00
- Fetches and updates server data (players, tribes, ODA, ODD, ODS, OD, conquers, configs).
2020-10-10 06:49:18 +00:00
- Saves daily player/tribe stats, player/tribe history, tribe changes, player name changes, server stats.
2021-05-03 14:40:13 +00:00
- Clears database from old player/tribe stats, player/tribe history.
## Development
2021-06-06 17:01:35 +00:00
### Prerequisites
1. Golang
2. PostgreSQL
3. Redis
### Installation
2021-05-06 13:06:38 +00:00
**Required ENV variables:**
2020-06-01 19:05:33 +00:00
```
DB_USER=your_db_user
DB_NAME=your_db_name
2020-06-01 19:05:33 +00:00
DB_PORT=5432
DB_HOST=your_db_host
DB_PASSWORD=your_db_pass
REDIS_ADDR=redis_addr
REDIS_DB=redis_db
REDIS_USER=redis_user
REDIS_PASSWORD=redis_password
RUN_ON_INIT=true|false
LOG_DB_QUERIES=true|false
WORKER_LIMIT=1
2020-06-01 19:05:33 +00:00
```
1. Clone this repo.
2021-06-06 17:01:35 +00:00
```
git clone git@github.com:tribalwarshelp/cron.git
```
2. Navigate to the directory where you have cloned this repo.
3. Set the required env variables directly in your system or create .env.local file.
2021-06-06 17:01:35 +00:00
4. Run the app.
```
go run main.go
```
## License
Distributed under the MIT License. See ``LICENSE`` for more information.
## Contact
Dawid Wysokiński - [contact@dwysokinski.me](mailto:contact@dwysokinski.me)