Added docker-compose

This commit is contained in:
Casey 2024-11-15 13:02:47 +03:00
parent 17f7a71f03
commit 0ff5ea8446
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
2 changed files with 37 additions and 0 deletions

3
README
View File

@ -6,4 +6,7 @@ Running in Docker:
docker build -t nfuck . 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 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 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

View File

@ -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"