fixes and improvements

This commit is contained in:
artie 2024-04-27 12:36:28 +02:00
parent 248243770c
commit bfe00bbb19
3 changed files with 43 additions and 5 deletions

View File

@ -1,11 +1,21 @@
ENV=env
BIN=$(ENV)/bin
PYTHON=$(BIN)/python
PIP=$(BIN)/pip
.PHONY: venv install dev watch clean
venv:
python3 -m venv env
install:
$(BIN)/pip install -Ur requirements.txt
$(PIP) install -Ur requirements.txt
dev:
source $(BIN)/activate; pnpx nodemon bot.py
$(PYTHON) -m artemis.bot
watch:
pnpx nodemon -e py,toml -x $(PYTHON) -m artemis.bot
clean:
rm -rf venv
rm -rf env

View File

@ -1 +1,30 @@
### beep boop
### Virtual env setup
```
make venv
```
### Installing dependencies
```
make install
```
### Launching dev
```
make dev
```
### Launching dev + watch
```
make watch
```
### Launching prod
```
pm2 start
```
### Launching prod (manual)
```
. env/bin/activate
ENV=production python3 -m artemis.bot
```

View File

@ -7,7 +7,6 @@ import sys
import time
import traceback
from functools import cached_property
from pkgutil import iter_modules
from typing import Optional
import aiohttp