Skip to content
Snippets Groups Projects
Verified Commit 6a5ae614 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

feat: add supervisor for managing Laravel workers and update entrypoint script

- Added Supervisor installation in Dockerfile.
- Copied Supervisor configuration file for Laravel worker.
- Updated entrypoint script to include database migration and Supervisor service start.
- Renamed .env.example to .env.local-example for clarity.
parent 15b8ab75
No related branches found
No related tags found
1 merge request!59Ajouter service ia & détection bots user agents
Pipeline #1033 passed
File moved
......@@ -20,5 +20,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
apt-get install -y nodejs
# Install supervisor
RUN apt-get install -y supervisor
COPY docker-init/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Setting PHP Configuration
COPY docker-init/php.ini $PHP_INI_DIR/php.ini
\ No newline at end of file
......@@ -4,8 +4,12 @@ echo "Installing dependencies..."
composer install
php artisan key:generate
npm install
npm run build
echo "Migrating database..."
php artisan migrate
echo "Launching Supervisor..."
service supervisor start
supervisorctl start all
echo "Running Octane..."
php artisan octane:frankenphp --workers=1 --max-requests=1
\ No newline at end of file
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /app/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment