Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
This commit is contained in:
48
nginx/scripts/ssl-renew.sh
Normal file
48
nginx/scripts/ssl-renew.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# SSL certificate renewal script for Let's Encrypt
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
DOMAIN=${DOMAIN:-localhost}
|
||||
EMAIL=${SSL_EMAIL:-admin@roa2web.local}
|
||||
WEBROOT_PATH=/var/www/certbot
|
||||
|
||||
# Function to log messages
|
||||
log() {
|
||||
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1"
|
||||
}
|
||||
|
||||
# Check if running in production
|
||||
if [ "$ENVIRONMENT" = "production" ]; then
|
||||
log "Starting SSL certificate renewal for domain: $DOMAIN"
|
||||
|
||||
# Initial certificate generation
|
||||
if [ ! -f "/etc/letsencrypt/live/$DOMAIN/fullchain.pem" ]; then
|
||||
log "Generating initial SSL certificate..."
|
||||
certbot certonly \
|
||||
--webroot \
|
||||
--webroot-path=$WEBROOT_PATH \
|
||||
--email=$EMAIL \
|
||||
--agree-tos \
|
||||
--no-eff-email \
|
||||
--force-renewal \
|
||||
-d $DOMAIN
|
||||
fi
|
||||
|
||||
# Renew certificates
|
||||
log "Attempting certificate renewal..."
|
||||
certbot renew --webroot --webroot-path=$WEBROOT_PATH
|
||||
|
||||
# Reload nginx if certificates were renewed
|
||||
if [ $? -eq 0 ]; then
|
||||
log "Certificate renewal successful, reloading nginx..."
|
||||
nginx -s reload
|
||||
else
|
||||
log "Certificate renewal failed or not needed"
|
||||
fi
|
||||
else
|
||||
log "Not in production environment, skipping SSL renewal"
|
||||
fi
|
||||
|
||||
log "SSL renewal script completed"
|
||||
Reference in New Issue
Block a user