Initial commit: Full project structure

- Backend: NestJS with Docker
- Frontend: Next.js with Docker
- Nginx configuration for reverse proxy
- PostgreSQL setup
- Docker compose for orchestration
- Development environment configuration
This commit is contained in:
2026-04-23 15:33:11 +03:30
commit 26bd35ae3c
94 changed files with 5627 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
BACKUP_DIR="/backups"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_NAME="dyolink_backup_$TIMESTAMP"
BACKUP_FILE="$BACKUP_DIR/$BACKUP_NAME.sql.gz"
echo "[$(date)] Starting database backup: $BACKUP_NAME"
# Perform backup
pg_dumpall -U $POSTGRES_USER | gzip > $BACKUP_FILE
if [ $? -eq 0 ]; then
BACKUP_SIZE=$(du -h $BACKUP_FILE | cut -f1)
echo "[$(date)] ✅ Backup completed: $BACKUP_NAME ($BACKUP_SIZE)"
# Keep only last 7 days of backups
find $BACKUP_DIR -name "dyolink_backup_*.sql.gz" -mtime +7 -delete
echo "[$(date)] Cleaned up backups older than 7 days"
else
echo "[$(date)] ❌ Backup failed!"
exit 1
fi