feat: add Docker support for server deployment

Add Docker deployment option for the server with multi-stage build.

Changes:
- Dockerfile: multi-stage build (golang:1.26-alpine → alpine:3.21, ~23MB)
- docker-compose.yml: server service on port 5300/udp with iptables redirect
- .env.example: documented environment variables template
- .dockerignore: optimized build context
- README.md & README-FA.md: Docker deployment guide, port 53 safety checks,
  and troubleshooting instructions (both EN and FA)
- configs: added more Telegram channels and X accounts

The container listens on port 5300 to avoid conflict with systemd-resolved.
External DNS traffic (port 53) is redirected via iptables PREROUTING.
No changes to existing Go source code.
This commit is contained in:
Mustafa
2026-04-13 01:04:09 +03:30
parent 90254f9d93
commit 15137c9e69
9 changed files with 468 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
# ============================================================
# thefeed-server — Docker Environment Variables
# ============================================================
# Copy this file to .env and fill in your values:
# cp .env.example .env
# ============================================================
# ----- Required -----
# Your DNS domain (e.g., t.example.com)
THEFEED_DOMAIN=t.example.com
# Encryption passphrase (shared between server and client)
THEFEED_KEY=your-secret-passphrase
# ----- Telegram Mode -----
# Default: --no-telegram (public channels only, no login needed)
# To use Telegram API, uncomment these AND remove --no-telegram from compose:
#TELEGRAM_API_ID=12345
#TELEGRAM_API_HASH=your-api-hash
#TELEGRAM_PHONE=+1234567890
#TELEGRAM_PASSWORD=your-2fa-password
# ----- Optional Settings -----
# Max messages per channel (default: 15)
#THEFEED_MSG_LIMIT=15
# Allow remote channel management via DNS (default: disabled)
#THEFEED_ALLOW_MANAGE=0
# Nitter RSS instances for X/Twitter (comma-separated)
#THEFEED_X_RSS_INSTANCES=http://nitter.net,https://nitter.net
# Max random padding bytes in DNS responses (anti-DPI, default: 32)
#THEFEED_PADDING=32
# Log every decoded DNS query (default: disabled)
#THEFEED_DEBUG=0