feat(gateway): include production Telegram user gateway
Version the NestJS TDLib gateway with Docker deployment, migrations, automated tests and platform integration documentation while excluding all account sessions, credentials, runtime databases and backups.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
# Install TDLib shared library for the gateway
|
||||
# This script downloads and installs pre-built tdlib
|
||||
|
||||
set -e
|
||||
|
||||
TDLIB_VERSION="1.8.0"
|
||||
TDLIB_URL="https://github.com/tdlib/td/archive/refs/tags/v${TDLIB_VERSION}.tar.gz"
|
||||
|
||||
echo "Installing TDLib v${TDLIB_VERSION}..."
|
||||
|
||||
# Install build dependencies
|
||||
apk add --no-cache \
|
||||
g++ \
|
||||
make \
|
||||
cmake \
|
||||
openssl-dev \
|
||||
zlib-dev \
|
||||
linux-headers \
|
||||
git
|
||||
|
||||
# Build TDLib
|
||||
cd /tmp
|
||||
wget -q "${TDLIB_URL}" -O tdlib.tar.gz
|
||||
tar xzf tdlib.tar.gz
|
||||
cd "td-${TDLIB_VERSION}"
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --target tdjson -j$(nproc)
|
||||
|
||||
# Install
|
||||
cp libtdjson.so /usr/local/lib/
|
||||
cp libtdjson.so.${TDLIB_VERSION} /usr/local/lib/
|
||||
|
||||
echo "TDLib installed successfully to /usr/local/lib/libtdjson.so"
|
||||
Reference in New Issue
Block a user