Merge pull request #19 from jkaninda/develop

Develop
This commit is contained in:
2023-11-13 15:16:35 +01:00
committed by GitHub
3 changed files with 19 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
version: '3'
services:
app:
image: jkaninda/nginx-php-fpm:latest
image: jkaninda/nginx-php-fpm:8.2
container_name: my-app
restart: unless-stopped
volumes:
@@ -125,6 +125,22 @@ RUN chown -R www-data:www-data /var/www/html/bootstrap/cache
### Add more supervisor process in
> /var/www/html/conf/worker/supervisor.conf
In case you want to execute and maintain a task or process with supervisor.
Find below an example with Apache Kafka, when you want to maintain a consumer process.
### Example:
```conf
[program:kafkaconsume-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan kafka:consumer
autostart=true
autorestart=true
numprocs=1
user=www-data
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/kafka.log
```
### Storage permision issue
> docker-compose exec php-fpm /bin/bash

View File

@@ -1,4 +1,4 @@
FROM php:8.1.13-fpm
FROM php:8.1-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1

View File

@@ -1,4 +1,4 @@
FROM php:8.2.8-fpm
FROM php:8.2.12-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1