Fix hardcoded localhost:8000 URLs
Some checks failed
continuous-integration/drone/push Build is failing

- Add backend/utils.py for URL management
- Update serializers to use normalize_file_url()
- Update views to use URL utils from env vars
- Fix frontend components to use NEXT_PUBLIC_API_URL
- Add new env vars: DJANGO_BACKEND_URL, DJANGO_MEDIA_BASE_URL
- Replace all hardcoded localhost:8000 with configurable URLs
This commit is contained in:
2025-11-08 19:25:35 +09:00
parent fb74a4a25d
commit e82f0f8e6f
17 changed files with 1396 additions and 58 deletions

33
scripts/quick-check.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
echo "🔍 Быстрая проверка API endpoints"
echo "=================================="
echo ""
echo "📊 Docker контейнеры:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo ""
echo "📊 Прослушиваемые порты:"
netstat -tlnp | grep -E ':(80|443|3000|8000) '
echo ""
echo "🌐 Проверка основных endpoint:"
echo -n "https://links.shareon.kr/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/" || echo "ERROR"
echo -n "https://links.shareon.kr/admin/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/admin/" || echo "ERROR"
echo -n "https://links.shareon.kr/api/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/api/" || echo "ERROR"
echo -n "http://localhost:8000/api/ : "
curl -s -o /dev/null -w "%{http_code}" "http://localhost:8000/api/" || echo "ERROR"
echo -n "http://localhost:3000/ : "
curl -s -o /dev/null -w "%{http_code}" "http://localhost:3000/" || echo "ERROR"
echo ""
echo "✅ Проверка завершена!"