Skip to content

Commit

Permalink
Merge pull request #63 from lbr38/devel
Browse files Browse the repository at this point in the history
4.3.0
  • Loading branch information
lbr38 authored Jul 9, 2024
2 parents f3259d2 + 5019a56 commit 797f4e5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ RUN apt-get install findutils iputils-ping git curl ca-certificates apt-transpor
RUN curl -sS https://packages.bespin.ovh/repo/gpgkeys/packages.bespin.ovh.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/packages.bespin.ovh.gpg
RUN echo "deb https://packages.bespin.ovh/repo/motion/bookworm/main_prod bookworm main" > /etc/apt/sources.list.d/motion.list

# Add nginx and PHP 8.1 repositories
# Add nginx and PHP repositories
RUN echo "deb https://packages.bespin.ovh/repo/motionui-nginx/bookworm/nginx_prod bookworm nginx" > /etc/apt/sources.list.d/nginx.list
RUN echo "deb https://packages.bespin.ovh/repo/motionui-php/bookworm/main_prod bookworm main" > /etc/apt/sources.list.d/php.list
RUN apt-get update -y

# Install nginx and PHP 8.1
RUN apt-get install nginx php8.1-fpm php8.1-cli php8.1-sqlite3 php8.1-xml php8.1-curl sqlite3 -y
# Install nginx and PHP 8.3
RUN apt-get install nginx php8.3-fpm php8.3-cli php8.3-sqlite3 php8.3-xml php8.3-curl sqlite3 -y

# Install motion
RUN apt-get install motion -y
Expand All @@ -48,7 +48,7 @@ RUN cp /tmp/motionui/docker/config/nginx/motionui.conf /etc/nginx/sites-enabled/
RUN rm -rf /etc/nginx/sites-enabled/default /var/www/html

# Configure PHP
RUN cp /tmp/motionui/docker/config/php/www.conf /etc/php/8.1/fpm/pool.d/www.conf
RUN cp /tmp/motionui/docker/config/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf

# Configure SQLite
RUN echo ".headers on" > /root/.sqliterc
Expand Down
2 changes: 1 addition & 1 deletion docker/config/nginx/motionui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ map $request_uri $loggable {

# Path to unix socket
upstream php-handler {
server unix:/run/php/php8.1-fpm.sock;
server unix:/run/php/php8.3-fpm.sock;
}

server {
Expand Down
2 changes: 1 addition & 1 deletion docker/config/php/www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ group = www-data
; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = /run/php/php8.1-fpm.sock
listen = /run/php/php8.3-fpm.sock

; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ ! -z "$FQDN" ];then
fi

# Start services
/usr/sbin/service php8.1-fpm start
/usr/sbin/service php8.3-fpm start
/usr/sbin/service nginx start
/usr/sbin/service postfix start

Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Process
{
private $workingDir = ROOT . '/.temp'; // Répertoire de travail pour php
private $workingDir = ROOT;
private $command;
private $env;
private $process;
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Service/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private function runService(string $parameter)
/**
* Check if the service with specified parameter is already running (a php process must be running)
*/
$myprocess = new \Controllers\Process("ps aux | grep 'motionui." . $parameter . "' | grep -v grep");
$myprocess = new \Controllers\Process("/usr/bin/ps aux | grep 'motionui." . $parameter . "' | grep -v grep");
$myprocess->execute();
$content = $myprocess->getOutput();
$myprocess->close();
Expand Down
2 changes: 1 addition & 1 deletion www/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.0
4.3.0

0 comments on commit 797f4e5

Please sign in to comment.