HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode-jobs/README.md
## Quadcode Careers site

### Requirements
1. PHP 7.3+
2. Composer
3. PostreSQL 10+
4. OpenSSL
5. cURL 7.19+
6. Cron

PHP Extensions

* BCMath PHP Extension
* Ctype PHP Extension
* Fileinfo PHP Extension
* JSON PHP Extension
* Mbstring PHP Extension
* OpenSSL PHP Extension
* PDO PHP Extension
* Tokenizer PHP Extension
* XML PHP Extension

### Installation

1. `composer install --prefer-dist --no-dev`
2. Set DB params, huntflow API in `.env` file
3. `php artisan storage:link`
4. Setup crontab
5. `chmod +x artisan`

You may set applicant source in `HUNTFLOW_APP_SOURCE` variable
You should set id of default(first) vacancy status in `HUNTFLOW_VACANCY_STATUS` variable

### Crontab
Update vacancies from huntflow every hour
```crontab
*/5 * * * * .../artisan huntflow:update >/dev/null 2>&1
```
replace `...` for full path to site

### Console commands

* `php artisan huntflow:me` Get user info
* `php artisan huntflow:accounts` Get user accounts
* `php artisan huntflow:applicant:sources` Get applicant sources
* `php artisan huntflow:vacancies:get` Get vacancy by id
* `php artisan huntflow:vacancies:list` Get vacancy list
* `php artisan huntflow:vacancies:statuses` Get vacancy statuses
* `php artisan huntflow:vacancies:statuses` Get vacancy statuses
* `php artisan huntflow:update` Update categories, locations, type works and vacancies in site cache


## Frontend

### Console commands

* `npm dev` Generate dev version of static files
* `npm prod` Generate prod version of static files
* `npm watch` Watch for static files changes

### Search

backend endpoint `/en/search`

GET params:
* `location[]=<int>`
* `category[]=<int>`
* `keywords=<string>`

### Application form

backend endpoint `/application`

POST params:

* `csrf=<string>` Get it from form hidden input or page head meta tag
* `vacancy_id=<id|empty>` Set from backend if user applied from vacancy page
* `first_name=<string>` Required
* `last_name=<string>` Required
* `email=<string>` Required
* `phone=<string>` Required
* `message=<string>`
* `cv=<string>` File

Returns `{"success": bool}` from validated backend
or validation errors array by Laravel

# Инструкция по деплою

* ```cp .env.example .env``` — переименовываем .env меняем параметры по необходимости
* ```docker-compose up -d``` — поднимаем докеры
* запрашиваем БД и разворачиваем в поднятый докер по настройкам из .env
* ```composer install``` — устанавливаем пакеты comport
* ```npm install && npm dev``` — запускаем сборку
* На http://localhost должен подняться сайт.