protected function schedule(Schedule $schedule): void
{
Log::debug('SCHEDULE RUN');
$schedule->job(new SyncChangesFrom1C)->everyTenSeconds();
}
FROM php:8.2-fpm
ARG user
ARG uid
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
libzip-dev \
libmagickwand-dev \
mariadb-client \
cron
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pecl install imagick \
&& docker-php-ext-enable imagick
#RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg
#RUN #docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath gd
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY ./src/api /var/www/api
RUN adduser $user
# Create system user to run Composer and Artisan Commands
RUN chown -R $user:$user /var/www/api
RUN usermod -aG www-data $user
RUN chmod -R g+rx /var/www/api/public
USER $user
# Set working directory
WORKDIR /var/www/api
RUN composer install
#
EXPOSE 9000
CMD ["php-fpm"]
public function login(LoginRequest $request): UserAccountResource
{
$authData = $request->validated(['login', 'password']);
$authData['banned_at'] = null;
$isAuthenticated = Auth::attempt(
credentials: $authData,
remember: $request->validated('is_remember')
);
if (!$isAuthenticated) {
abort(401, __('auth.failed'));
}
$request->session()->regenerate();
$user = Auth::user();
return UserAccountResource::make($user);
}
{"login":"","password":"","is_remember":true}
Вроде бы правильной конфигурацией php:
laravel.pool.conf:
Сам файл в контейнере лежит тут:
Источник: https://laracasts.com/discuss/channels/laravel/ngi...