diff options
-rw-r--r-- | README.md | 44 | ||||
-rw-r--r-- | config-example.toml | 21 | ||||
-rw-r--r-- | docker-compose-postgres.yaml | 6 | ||||
-rw-r--r-- | docker-compose.yaml | 21 |
4 files changed, 35 insertions, 57 deletions
@@ -289,6 +289,8 @@ fgColor = 0 bgColor = 28 ``` +For the watchList option, please remember to put the channels also in your scrape `scrapeChannels`.<br/> + ## RSS The rss file is self-explanatory. Here's an example: @@ -458,41 +460,6 @@ milla can be used with [gvisor](https://gvisor.dev/)'s docker runtime, `runsc`. ```yaml services: - milla: - image: milla - build: - context: . - deploy: - resources: - limits: - memory: 64M - logging: - driver: "json-file" - options: - max-size: "100m" - networks: - - millanet - user: ${UID}:${GID} - restart: unless-stopped - command: ["--config", "/opt/milla/config.toml"] - volumes: - - ./config-gpt.toml:/opt/milla/config.toml - - /etc/localtime:/etc/localtime:ro - - /etc/resolv.conf:/etc/resolv.conf:ro - cap_drop: - - ALL - runtime: runsc -networks: - millanet: - driver: bridge -``` - -### Public Message Storage - -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/> - -```yaml -services: terra: image: milla_distroless_vendored build: @@ -517,11 +484,6 @@ services: - /etc/localtime:/etc/localtime:ro cap_drop: - ALL - environment: - - HTTPS_PROXY=http://172.17.0.1:8120 - - https_proxy=http://172.17.0.1:8120 - - HTTP_PROXY=http://172.17.0.1:8120 - - http_proxy=http://172.17.0.1:8120 postgres: image: postgres:16-alpine3.19 deploy: @@ -564,7 +526,7 @@ services: max-size: "100m" environment: - PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-5050} - - PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:-devi@terminaldweller.com} + - PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL: - PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin_pass - PGADMIN_DISABLE_POSTFIX=${PGADMIN_DISABLE_POSTFIX:-YES} ports: diff --git a/config-example.toml b/config-example.toml index 2b12ecb..c968dd4 100644 --- a/config-example.toml +++ b/config-example.toml @@ -22,13 +22,26 @@ databaseAddress = "postgres:5432" databasePassword = "changeme" databaseUser = "devi" databaseName = "milla" -scrapeChannels = ["#soulhack", "#warroom"] +scrapeChannels = ["#soulhack", "#warroom", "#securityfeeds"] ircProxy = "socks5://127.0.0.1:9050" llmProxy = "http://127.0.0.1:8180" skipTLSVerify = false useTLS = true -plugins = ["/plugins/plugin1.lua", "/plugins/plugin2.lua"] adminOnly = false +plugins = ["/plugins/ip.lua", "/plugins/urban.lua"] +[ircd.devinet.watchlist.security] +watchList = ["#securityfeeds"] +watchFiles = ["/watchfiles/voidbox.list"] +alertChannel = "#milla_alerts" +eventTypes = ["PRIVMSG"] +fgColor = 0 +bgColor = 28 +[ircd.devinet.rss.manga] +rssFile = "/rssfeeds/manga.json" +channel = "#manga" +[ircd.devinet.rss.anime] +rssFile = "/rssfeeds/anime.json" +channel = "#anime" [ircd.liberanet] ircServer = "irc.libera.chat" @@ -57,12 +70,12 @@ out = true ircProxy = "socks5://127.0.0.1:9051" llmProxy = "http://127.0.0.1:8181" adminOnly = true -[ircd.devinet_terra.customCommands.digest] +[ircd.liberanet.customCommands.digest] sql = "select log from liberanet_milla_us_market_news order by log desc;" limit = 300 context = ["you are a sentiment-analysis bot"] 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." -[ircd.devinet_terra.customCommands.summarize] +[ircd.liberanet.customCommands.summarize] sql= "select log from liberanet_milla_us_market_news order by log desc;" limit= 300 context = ["you are a sentiment-analysis bot"] diff --git a/docker-compose-postgres.yaml b/docker-compose-postgres.yaml index cc17d83..fc9b3a3 100644 --- a/docker-compose-postgres.yaml +++ b/docker-compose-postgres.yaml @@ -19,8 +19,9 @@ services: entrypoint: ["/usr/bin/milla"] command: ["--config", "/config.toml"] volumes: - - ./config.toml:/config.toml + - ./config-omni.toml:/config.toml - /etc/localtime:/etc/localtime:ro + - ./plugins/:/plugins/:ro cap_drop: - ALL postgres: @@ -52,7 +53,6 @@ services: - pg_user_secret - pg_initdb_args_secret - pg_db_secret - runtime: runsc pgadmin: image: dpage/pgadmin4:8.6 deploy: @@ -65,7 +65,7 @@ services: max-size: "100m" environment: - PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-5050} - - PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:-devi@terminaldweller.com} + - PGADMIN_DEFAULT_EMAIL= - PGADMIN_DEFAULT_PASSWORD_FILE=/run/secrets/pgadmin_pass - PGADMIN_DISABLE_POSTFIX=${PGADMIN_DISABLE_POSTFIX:-YES} ports: diff --git a/docker-compose.yaml b/docker-compose.yaml index 6e64496..97413b0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,25 +1,28 @@ services: - milla: - image: milla + terra: + image: milla_distroless_vendored build: context: . + dockerfile: ./Dockerfile_distroless_vendored deploy: resources: limits: - memory: 64M - user: ${UID}:${GID} + memory: 128M logging: driver: "json-file" options: max-size: "100m" networks: - - millanet + - terranet + user: 1000:1000 restart: unless-stopped - command: ["--config", "/opt/milla/config.toml"] + entrypoint: ["/usr/bin/milla"] + command: ["--config", "/config.toml"] volumes: - - ./config.toml:/opt/milla/config.toml - - /etc/ssl/certs:/etc/ssl/certs:ro + - ./config-omni.toml:/config.toml + - /etc/localtime:/etc/localtime:ro + - ./plugins/:/plugins/:ro cap_drop: - ALL networks: - millanet: + terranet: |