Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mgalgs/sandiegolibrebot

Serial crossposter!
https://github.com/mgalgs/sandiegolibrebot

Last synced: about 2 months ago
JSON representation

Serial crossposter!

Awesome Lists containing this project

README

        

Your friendly [r/SanDiegoLibre](https://reddit.com/r/SanDiegoLibre) bot.

## Local environment setup

```
git clone https://github.com/mgalgs/SanDiegoLibreBot.git
cd SanDiegoLibreBot
```

And create a file named `env.sh` with the following content:

```
CLIENT_ID=
CLIENT_SECRET=
REDDIT_USERNAME=
REDDIT_PASSWORD=
```

One-time virtual environment initialization:

```
python3 -m venv venv
```

Then every time you want to work on the bot:

```
source enter.sh
```

To run the bot against `r/SanDiegoLibreTest`:

```
python src/main.py
```

To run it against `r/SanDiegoLibre`:

```
PROD=yes python src/main.py
```

## Kubernetes setup

This bot is currently running on a kubernetes cluster for
high-availability.

### Configuration (secrets)

First you need to make your `env.sh` into a kubernetes Secret.

```
./k8s/gen_secrets.sh sdlbot-secrets < env.sh | kubectl apply -f -
```

### Deployment

```
kubectl apply -f ./k8s/deployment.yaml
```