F4ilji
a963647770
fix(vikon): use form-encoded POST + correct domain for OAuth token exchange
...
- HttpTask::post() now sends application/x-www-form-urlencoded (not JSON)
- AuthenticateAction sends to db-nica.ru (not auth.db-nica.ru) matching original vikon_core
- Original code: remoteRequest($apiDomen . 'oauth2/authorize/token', ...)
2026-07-04 13:46:49 +05:00
F4ilji
2ccfb24d1d
fix(vikon): use vikon_core redirect_uri for OAuth (registered on VIKON server)
...
- vikon_core/update/index.php now redirects OAuth callback to /dashboard/vikon-updates
- Vue frontend sends redirect_uri=https://www.ntspi.ru/vikon_core/update/index.php
- This URL is registered on db-nica.ru for client_id=542
2026-07-04 13:43:42 +05:00
F4ilji
94e17dfbbc
fix(vikon): use api_domain for OAuth authorize URL (not auth_domain)
...
Original vikon_core used db-nica.ru for /oauth2/authorize, not auth.db-nica.ru.
This was causing 'Client authentication failed' error.
2026-07-04 13:33:39 +05:00
F4ilji
ba99b2a093
fix(vikon): switch validateFileTypes from blacklist to whitelist
...
Based on actual file analysis of sveden/abitur/vsoko modules:
- html, css, js, map (content + assets)
- png, jpg, gif, svg, ico, bmp (images)
- ttf, woff, woff2, eot (fonts)
- pdf, doc, docx (documents)
- vikon (module-specific)
No PHP/ASP/executables in allowed list — any non-whitelisted file is blocked.
2026-07-04 13:21:54 +05:00
F4ilji
f4f8bc8e77
feat(vikon): rewrite VikonIntegration from scratch — OAuth + core update
...
- HttpTask: Laravel Http facade with SSL enabled, retry, timeout
- ValidateTokenTask: token check via auth.db-nica.ru
- RefreshTokenTask: token refresh via db-nica.ru
- FilesystemTask: path traversal protection, blocked extensions (PHP/ASP/etc)
- AuthenticateAction: OAuth2 code→token exchange
- CheckAccessAction: token validation + filesystem writability check
- CheckVersionAction: version comparison against remote API
- UpdateCoreAction: ZIP download, Zip Slip protection, atomic sync with rollback
- VikonController: thin controller, 7 endpoints with Session-based token storage
- Routes: access-check, dashboard.auth, throttle:30,1 middleware
- Vue 3 Composition API frontend with progress bar
- Config: all secrets in .env via config/vikon.php
- vikon_core kept as fallback (not deleted)
2026-07-04 12:53:28 +05:00
F4ilji
82df1210c2
feat(vikon): add config/vikon.php with module definitions
2026-07-04 12:41:22 +05:00
F4ilji
47aac647ac
feat(vikon): remove broken VikonIntegration container - starting fresh
2026-07-04 12:40:41 +05:00
F4ilji
67b9aae961
feat(ci): add migration rollback and remove duplicate chown in Jenkinsfile
...
- Save pre-deploy SHA before git pull for automatic rollback
- On migrate failure: git reset + migrate:rollback + reinstall deps + restart
- Remove duplicate chown from Restart Services stage (already in Fix Permissions)
- Clean up .deploy_prev_sha after deploy completes
2026-07-03 09:57:34 +05:00
F4ilji
282d5a7c38
Add email attachments cleanup (older than 3 days)
2026-07-02 23:12:29 +05:00
F4ilji
d1f216d04a
Reduce backup retention to 3 days
2026-07-02 22:31:18 +05:00
F4ilji
bb04a1af14
Add DB backup stage before deploy
2026-07-02 22:22:27 +05:00
F4ilji
dcb0426264
Fix prod nginx: ^~ for Jenkins proxy
2026-07-02 21:48:07 +05:00
F4ilji
b877153f3f
Fix: use ^~ for Jenkins to override regex static locations
2026-07-02 21:46:15 +05:00
F4ilji
db968ad9b0
Simplify Jenkins proxy: remove port exposure, add proxy_redirect
2026-07-02 21:43:56 +05:00
F4ilji
acae8ae59d
Fix: use ^~ for Jenkins static assets to override regex
2026-07-02 21:42:16 +05:00
F4ilji
b041558cc3
Fix Jenkins proxy: separate static assets location
2026-07-02 21:41:32 +05:00
F4ilji
c807947968
Fix Jenkins proxy with sub_filter for static assets
2026-07-02 21:40:29 +05:00
F4ilji
e0ceecf157
Add Jenkins prefix /jenkins for nginx proxy
2026-07-02 21:39:35 +05:00
F4ilji
aff60841b4
Add Jenkins proxy to test nginx config
2026-07-02 21:38:29 +05:00
F4ilji
ba362902e6
Add Jenkins reverse proxy via nginx
2026-07-02 21:36:23 +05:00
F4ilji
f652308421
Add jenkins service to docker-compose.yml
2026-07-02 21:15:27 +05:00
F4ilji
d87bc581d1
Fix: remove dead placeholder view path in AppServiceProvider
2026-07-02 20:56:37 +05:00
F4ilji
acef609a2f
Fix composer open_basedir restriction
2026-07-02 20:54:14 +05:00
F4ilji
44ad8ef460
Fix: use docker exec instead of docker compose to avoid container name conflicts
2026-07-02 20:53:04 +05:00
F4ilji
25bc144ac7
Add Jenkinsfile for CI/CD pipeline
2026-07-02 20:51:45 +05:00
F4ilji
709c51ea49
remove: all deploy UI/backend code, keep _deploy folder only
...
- Delete DeployRunCommand, DeployController, deploy API routes
- Delete Dashboard/Deploy Vue pages and components
- Remove deploy route from web.php
- Remove deploy quick action from config
- Remove DeployRunCommand from ConsoleKernel
2026-07-02 17:36:42 +05:00
F4ilji
c8693b8f0e
fix: replace web middleware with minimal session+CSRF stack for deploy API
2026-07-02 17:34:27 +05:00
F4ilji
48ffd217b8
fix: secure deploy API, remove Docker-in-Docker, add DB backup
...
- Add web+superadmin middleware to /api/deploy routes
- Return JSON 403 in EnsureUserIsSuperadmin for API requests
- Remove Docker CLI and docker.sock from app container
- Replace docker compose restart with supervisorctl
- Add mysqldump backup step before migrations
2026-07-02 17:26:38 +05:00
F4ilji
6ed11cab2d
change
2026-07-02 17:11:38 +05:00
F4ilji
fce1d3f454
fix: proper route structure - API in api.php, web in web.php
2026-07-02 17:10:44 +05:00
F4ilji
b2fec84080
fix: empty api.php since deploy routes moved to web
2026-07-02 17:05:55 +05:00
F4ilji
8b312e0ecd
fix: move deploy API routes to web group with session auth
2026-07-02 17:01:32 +05:00
F4ilji
74d7c2b563
fix: add session middleware for API auth
2026-07-02 17:00:32 +05:00
F4ilji
e0cb9642cd
fix: add better error logging for deploy API
2026-07-02 16:55:43 +05:00
F4ilji
2b5b4ee48f
error alert change
2026-07-02 16:49:55 +05:00
F4ilji
ae4cdc5efc
fix: correct path to API routes file
2026-07-02 16:45:59 +05:00
F4ilji
ca23c6d669
fix: use auth:web middleware for API routes
2026-07-02 16:42:39 +05:00
F4ilji
c80baf4807
fix: return JSON 401 for unauthenticated API requests
2026-07-02 13:38:03 +05:00
F4ilji
aa6c5bc6be
error alert change
2026-07-02 13:25:11 +05:00
F4ilji
92bb10faba
fix: add CSRF token and cookies to deploy API requests
2026-07-02 13:17:24 +05:00
F4ilji
814c06bbb4
fix: correct path to dashboard API routes
2026-07-02 13:09:55 +05:00
F4ilji
c12ac98387
fix: register deploy:run command in ConsoleKernel
2026-07-02 12:57:14 +05:00
F4ilji
6fb0079e7c
feat: add deploy route and sidebar navigation
2026-07-02 12:50:09 +05:00
F4ilji
13d7d36088
feat: add deploy dashboard page with components
2026-07-02 12:48:49 +05:00
F4ilji
73d123a62d
feat: add deploy API endpoints
2026-07-02 12:48:09 +05:00
F4ilji
c216f929d4
feat: add deploy:run artisan command
2026-07-02 12:47:17 +05:00
F4ilji
8bc5c367d6
revert: remove deploy UI, controller, actions, tasks, and routes
...
- Remove Deploy/Index.vue, DeployController, DeploySiteAction, DeployTask
- Remove deploy routes from web.php
- Remove deploy menu item from menuConfig
- Remove deploy button and methods from Main.vue
- Remove deploy logging channel from logging.php
- Keep _deploy/ folder for future CI/CD setup
2026-07-02 12:00:48 +05:00
F4ilji
cc98d509e5
fix: add Docker CLI to PHP container for deploy script
...
- Install docker-ce-cli + docker-compose-plugin in Dockerfile
- Mount Docker socket in docker-compose.yml
- Add www-data to docker group for socket access
2026-07-02 01:50:40 +05:00
F4ilji
3da95da099
fix: use X-CSRF-TOKEN header to match Main.vue pattern
...
X-XSRF-TOKEN is for Laravel's cookie-based CSRF verification,
but this app uses meta tag CSRF. Main.vue uses X-CSRF-TOKEN
and works correctly.
2026-07-02 01:36:05 +05:00
F4ilji
de4fdc2c72
fix: add credentials same-origin to Deploy fetch calls
...
Without this, session cookie is not sent with fetch() requests,
causing server to redirect to login (returning HTML instead of JSON).
2026-07-02 01:29:05 +05:00