fix(docker): resolve nginx and backend path configuration issues
All checks were successful
continuous-integration/drone/push Build is passing

- Add nginx/default.conf with simplified configuration to fix "no events section" error
- Update docker-compose.yml to mount nginx/default.conf instead of nginx.conf
- Fix backend/daemons.py data path from backend/data/daemons.json to data/daemons.json
- Improve users.json path detection with fallback logic in daemons.py
- Add servers directory to .gitignore
- Create DOCKER_FIX.md documentation with troubleshooting steps and solutions
- Ensure data directory is created automatically when backend starts
This commit is contained in:
2026-01-17 10:32:46 +06:00
parent d188cec1f0
commit e02789ef53
5 changed files with 245 additions and 3 deletions

View File

@@ -15,11 +15,16 @@ router = APIRouter()
security = HTTPBearer(auto_error=False)
# Файл с конфигурацией демонов
DAEMONS_FILE = Path("backend/data/daemons.json")
DAEMONS_FILE = Path("data/daemons.json")
DAEMONS_FILE.parent.mkdir(exist_ok=True)
# Файл с пользователями - проверяем оба возможных пути
USERS_FILE = Path("backend/users.json") if Path("backend/users.json").exists() else Path("users.json")
if Path("users.json").exists():
USERS_FILE = Path("users.json")
elif Path("backend/users.json").exists():
USERS_FILE = Path("backend/users.json")
else:
USERS_FILE = Path("users.json") # По умолчанию
# Настройки JWT (должны совпадать с main.py)
SECRET_KEY = "your-secret-key-change-this-in-production-12345"