From 0ff5ea8446686cb2dc3df9c8e5f7a0bb124928b6 Mon Sep 17 00:00:00 2001 From: hkc Date: Fri, 15 Nov 2024 13:02:47 +0300 Subject: [PATCH] Added docker-compose --- README | 3 +++ docker-compose.example.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docker-compose.example.yml diff --git a/README b/README index 1dcaf00..3ffe3a0 100644 --- a/README +++ b/README @@ -6,4 +6,7 @@ Running in Docker: docker build -t nfuck . docker run --restart=unless-stopped --name bot-nfuck -e TG_BOT_TOKEN=123:blah -e DB_PATH=/app/db.db3 -d nfuck +Alternatively, copy docker-compose.example.yml and edit it a bit and then run: +docker compose build . && docker compose up -d + You can also add `-e SILENT_REMOVAL_IDS=123,456` with a comma-separated list of chats where it should silently remove messages without notifying anyone diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..e81ba25 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,34 @@ +services: + ## Uncomment this section and nfuck.network_mode to pass everything thru WireGuard. + ## Put your wg.conf into ./wg/wg_confs/ + # wireguard: + # image: lscr.io/linuxserver/wireguard + # container_name: bot-nfuck-wg + # cap_add: + # - NET_ADMIN + # - SYS_MODULE + # environment: + # - PUID=1000 + # - PGID=1000 + # - TZ=Europe/Moscow + # volumes: + # - ./wg:/config + # - /lib/modules:/lib/modules + # sysctls: + # - net.ipv4.conf.all.src_valid_mark=1 + # restart: unless-stopped + nfuck: + image: nfuck + build: . + container_name: bot-nfuck + restart: unless-stopped + # network_mode: service:wireguard + environment: + ## comma-separated list of domaisn that won't be processed. + - "DOMAIN_WHITELIST=vk.com,*.vk.com,*.forbes.com,forbes.com,*.wikipedia.org,wikipedia.org,fragment.com,youtube.com" + ## uncomment and fill with comma-separated list of chat IDs where it should just remove without any message + #- "SILENT_REMOVAL_IDS=" + ## currently unused + - "DB_PATH=/app/db.db3" + ## talk to @botfather + - "TG_BOT_TOKEN=CHANGEME"