Enhance ExaBGP configuration and scripts by adding environment variable support for neighbor IP, local AS, and router ID. Update Dockerfile to include permissions for the new generate_config.py script. Improve start.sh to generate configuration dynamically and display relevant information during startup.
Build and Push Docker Image / build (push) Successful in 3m34s

This commit is contained in:
2025-07-11 16:28:33 +07:00
parent 050cf03339
commit a437b75540
6 changed files with 146 additions and 61 deletions
+12
View File
@@ -10,6 +10,7 @@ echo "Starting BGP Server..."
mkdir -p /app/logs
mkdir -p /app/run
mkdir -p /run/exabgp
mkdir -p /app/data
# Создание named pipes для CLI в стандартном месте
if [ ! -p "/run/exabgp/exabgp.in" ] || [ ! -p "/run/exabgp/exabgp.out" ]; then
@@ -32,8 +33,19 @@ if [ ! -f "/app/data/prefixes.txt" ]; then
echo "192.168.1.0/24" >> /app/data/prefixes.txt
fi
echo "Prefixes file content:"
cat /app/data/prefixes.txt
echo "---"
# Генерация конфигурации из переменных окружения
echo "Generating ExaBGP configuration from environment variables..."
python3 /app/scripts/generate_config.py
# Проверка конфигурации
echo "Validating ExaBGP configuration..."
echo "Configuration file content:"
cat /app/exabgp.conf
echo "---"
exabgp --validate /app/exabgp.conf
# Запуск ExaBGP в фоновом режиме