feat: Implement the core InterNetX DDNS updater application with API, services, middleware, Docker support, and a detailed README.

This commit is contained in:
2026-01-26 19:53:31 +01:00
parent bba71a7272
commit 11d2c1fce2
19 changed files with 1739 additions and 2 deletions

50
docker-compose.yml Normal file
View File

@@ -0,0 +1,50 @@
version: '3.8'
services:
ddns-updater:
build: .
container_name: internetx-ddns-updater
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
# InterNetX API - Configure via .env file
- INTERNETX_API_URL=${INTERNETX_API_URL}
- INTERNETX_USER=${INTERNETX_USER}
- INTERNETX_PASSWORD=${INTERNETX_PASSWORD}
- INTERNETX_CONTEXT=${INTERNETX_CONTEXT}
# DDNS Configuration
- DEFAULT_ZONE=${DEFAULT_ZONE}
- DEFAULT_TTL=${DEFAULT_TTL}
# Security
- AUTH_TOKENS=${AUTH_TOKENS}
- IP_WHITELIST=${IP_WHITELIST}
# Rate Limiting
- RATE_LIMIT_WINDOW_MS=${RATE_LIMIT_WINDOW_MS}
- RATE_LIMIT_MAX_REQUESTS=${RATE_LIMIT_MAX_REQUESTS}
# Logging
- LOG_LEVEL=${LOG_LEVEL}
- LOG_FILE_MAX_SIZE=${LOG_FILE_MAX_SIZE}
- LOG_FILE_MAX_AGE=${LOG_FILE_MAX_AGE}
volumes:
- ./logs:/app/logs
- ./public:/app/public:ro
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {r.statusCode === 200 ? process.exit(0) : process.exit(1)})"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- ddns-network
networks:
ddns-network:
driver: bridge