expense-bot/README.md

42 lines
747 B
Markdown
Raw Permalink Normal View History

2024-01-13 17:41:40 +01:00
# expense-bot
2024-01-13 18:14:01 +01:00
## Build Image
2024-01-13 17:41:40 +01:00
2024-01-13 18:14:01 +01:00
```
docker build -t expense-bot:latest .
2024-01-13 17:41:40 +01:00
```
2024-01-13 18:14:01 +01:00
## [WIP] Push Image to registry
```
$ podman login quay.io
$ podman push [hash]|[localhost/expense-bot:0.1.0] docker://quay.io/ksemele/expense-bot:0.1.0
```
2024-01-13 18:14:01 +01:00
## Run bot
### local
```bash
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
```
2024-01-13 18:14:01 +01:00
### container
Ensure you have an `.env` file with followed content:
```yaml
ADMINS=12345678,12345677,12345676
BOT_TOKEN=0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
HOST_IP=localhost
```
2024-01-13 18:30:11 +01:00
Then run on Docker
2024-01-13 18:14:01 +01:00
```bash
2024-01-13 18:30:11 +01:00
docker run --name expense-bot --env-file .env -d expense-bot:latest
```
or Podman
```bash
podman run --restart always --name expense-bot --env-file .env -d expense-bot:latest
2024-01-13 17:41:40 +01:00
```