Skip to content

Commit fa11101

Browse files
updated the examples and the readme
1 parent bcbbf64 commit fa11101

4 files changed

+35
-57
lines changed

README.md

+3-41
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ fgColor = 0
289289
bgColor = 28
290290
```
291291

292+
For the watchList option, please remember to put the channels also in your scrape `scrapeChannels`.<br/>
293+
292294
## RSS
293295

294296
The rss file is self-explanatory. Here's an example:
@@ -456,41 +458,6 @@ Images are automatically pushed to dockerhub. So you can get it from [there](htt
456458
An example docker compose file is provided in the repo under `docker-compose.yaml`.
457459
milla can be used with [gvisor](https://gvisor.dev/)'s docker runtime, `runsc`.
458460

459-
```yaml
460-
services:
461-
milla:
462-
image: milla
463-
build:
464-
context: .
465-
deploy:
466-
resources:
467-
limits:
468-
memory: 64M
469-
logging:
470-
driver: "json-file"
471-
options:
472-
max-size: "100m"
473-
networks:
474-
- millanet
475-
user: ${UID}:${GID}
476-
restart: unless-stopped
477-
command: ["--config", "/opt/milla/config.toml"]
478-
volumes:
479-
- ./config-gpt.toml:/opt/milla/config.toml
480-
- /etc/localtime:/etc/localtime:ro
481-
- /etc/resolv.conf:/etc/resolv.conf:ro
482-
cap_drop:
483-
- ALL
484-
runtime: runsc
485-
networks:
486-
millanet:
487-
driver: bridge
488-
```
489-
490-
### Public Message Storage
491-
492-
milla can be configured to store all incoming public messages for future use in a postgres database. An example docker compose file is provided under `docker-compose-postgres.yaml`.<br/>
493-
494461
```yaml
495462
services:
496463
terra:
@@ -517,11 +484,6 @@ services:
517484
- /etc/localtime:/etc/localtime:ro
518485
cap_drop:
519486
- ALL
520-
environment:
521-
- HTTPS_PROXY=http://172.17.0.1:8120
522-
- https_proxy=http://172.17.0.1:8120
523-
- HTTP_PROXY=http://172.17.0.1:8120
524-
- http_proxy=http://172.17.0.1:8120
525487
postgres:
526488
image: postgres:16-alpine3.19
527489
deploy:
@@ -564,7 +526,7 @@ services:
564526
max-size: "100m"
565527
environment:
566528
- PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-5050}
567-
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:[email protected]}
529+
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:
568530
- PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin_pass
569531
- PGADMIN_DISABLE_POSTFIX=${PGADMIN_DISABLE_POSTFIX:-YES}
570532
ports:

config-example.toml

+17-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,26 @@ databaseAddress = "postgres:5432"
2222
databasePassword = "changeme"
2323
databaseUser = "devi"
2424
databaseName = "milla"
25-
scrapeChannels = ["#soulhack", "#warroom"]
25+
scrapeChannels = ["#soulhack", "#warroom", "#securityfeeds"]
2626
ircProxy = "socks5://127.0.0.1:9050"
2727
llmProxy = "http://127.0.0.1:8180"
2828
skipTLSVerify = false
2929
useTLS = true
30-
plugins = ["/plugins/plugin1.lua", "/plugins/plugin2.lua"]
3130
adminOnly = false
31+
plugins = ["/plugins/ip.lua", "/plugins/urban.lua"]
32+
[ircd.devinet.watchlist.security]
33+
watchList = ["#securityfeeds"]
34+
watchFiles = ["/watchfiles/voidbox.list"]
35+
alertChannel = "#milla_alerts"
36+
eventTypes = ["PRIVMSG"]
37+
fgColor = 0
38+
bgColor = 28
39+
[ircd.devinet.rss.manga]
40+
rssFile = "/rssfeeds/manga.json"
41+
channel = "#manga"
42+
[ircd.devinet.rss.anime]
43+
rssFile = "/rssfeeds/anime.json"
44+
channel = "#anime"
3245

3346
[ircd.liberanet]
3447
ircServer = "irc.libera.chat"
@@ -57,12 +70,12 @@ out = true
5770
ircProxy = "socks5://127.0.0.1:9051"
5871
llmProxy = "http://127.0.0.1:8181"
5972
adminOnly = true
60-
[ircd.devinet_terra.customCommands.digest]
73+
[ircd.liberanet.customCommands.digest]
6174
sql = "select log from liberanet_milla_us_market_news order by log desc;"
6275
limit = 300
6376
context = ["you are a sentiment-analysis bot"]
6477
prompt= "i have provided to you news headlines in the form of previous conversations between you and me using the user role. please provide the digest of the news for me."
65-
[ircd.devinet_terra.customCommands.summarize]
78+
[ircd.liberanet.customCommands.summarize]
6679
sql= "select log from liberanet_milla_us_market_news order by log desc;"
6780
limit= 300
6881
context = ["you are a sentiment-analysis bot"]

docker-compose-postgres.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ services:
1919
entrypoint: ["/usr/bin/milla"]
2020
command: ["--config", "/config.toml"]
2121
volumes:
22-
- ./config.toml:/config.toml
22+
- ./config-omni.toml:/config.toml
2323
- /etc/localtime:/etc/localtime:ro
24+
- ./plugins/:/plugins/:ro
2425
cap_drop:
2526
- ALL
2627
postgres:
@@ -52,7 +53,6 @@ services:
5253
- pg_user_secret
5354
- pg_initdb_args_secret
5455
- pg_db_secret
55-
runtime: runsc
5656
pgadmin:
5757
image: dpage/pgadmin4:8.6
5858
deploy:
@@ -65,7 +65,7 @@ services:
6565
max-size: "100m"
6666
environment:
6767
- PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-5050}
68-
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:[email protected]}
68+
- PGADMIN_DEFAULT_EMAIL=
6969
- PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin_pass
7070
- PGADMIN_DISABLE_POSTFIX=${PGADMIN_DISABLE_POSTFIX:-YES}
7171
ports:

docker-compose.yaml

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
services:
2-
milla:
3-
image: milla
2+
terra:
3+
image: milla_distroless_vendored
44
build:
55
context: .
6+
dockerfile: ./Dockerfile_distroless_vendored
67
deploy:
78
resources:
89
limits:
9-
memory: 64M
10-
user: ${UID}:${GID}
10+
memory: 128M
1111
logging:
1212
driver: "json-file"
1313
options:
1414
max-size: "100m"
1515
networks:
16-
- millanet
16+
- terranet
17+
user: 1000:1000
1718
restart: unless-stopped
18-
command: ["--config", "/opt/milla/config.toml"]
19+
entrypoint: ["/usr/bin/milla"]
20+
command: ["--config", "/config.toml"]
1921
volumes:
20-
- ./config.toml:/opt/milla/config.toml
21-
- /etc/ssl/certs:/etc/ssl/certs:ro
22+
- ./config-omni.toml:/config.toml
23+
- /etc/localtime:/etc/localtime:ro
24+
- ./plugins/:/plugins/:ro
2225
cap_drop:
2326
- ALL
2427
networks:
25-
millanet:
28+
terranet:

0 commit comments

Comments
 (0)