Skip to content

Modular logistics and supply chain operating system (LSOS)

reverted back to useing httpd container via docker-compose for development, use volume mount for uploads, upgraded core-api to patch seed, removed nginx.conf and startup.sh as no longer needed

Ronald A. Richardson03bbae856afb
diff --git a/api/composer.dev.json b/api/composer.dev.json
index b77af21c..f0234002 100644
--- a/api/composer.dev.json
+++ b/api/composer.dev.json
@@ -6,9 +6,9 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
- "fleetbase/core-api": "^1.1.1-alpha",
- "fleetbase/fleetops-api": "^1.0.5-alpha",
- "fleetbase/storefront-api": "^1.0.4-alpha",
+ "fleetbase/core-api": "^1.1.4-alpha",
+ "fleetbase/fleetops-api": "^1.0.7-alpha",
+ "fleetbase/storefront-api": "^1.0.6-alpha",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",
diff --git a/api/composer.json b/api/composer.json
index 41eb907a..c50fb57b 100644
--- a/api/composer.json
+++ b/api/composer.json
@@ -9,7 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
- "fleetbase/core-api": "^1.1.3-alpha",
+ "fleetbase/core-api": "^1.1.4-alpha",
"fleetbase/fleetops-api": "^1.0.7-alpha",
"fleetbase/storefront-api": "^1.0.6-alpha",
"fruitcake/laravel-cors": "^2.0",
diff --git a/api/composer.lock b/api/composer.lock
index 857360a5..3b6b0222 100644
--- a/api/composer.lock
+++ b/api/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "68fc1b07830103e7db4c99e8b79b79f0",
+ "content-hash": "620f7df1fbbebc2614c57bf7c580c4a8",
"packages": [
{
"name": "aloha/twilio",
@@ -192,16 +192,16 @@
},
{
"name": "aws/aws-sdk-php",
- "version": "3.275.5",
+ "version": "3.275.7",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
- "reference": "d46961b82e857f77059c0c78160719ecb26f6cc6"
+ "reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d46961b82e857f77059c0c78160719ecb26f6cc6",
- "reference": "d46961b82e857f77059c0c78160719ecb26f6cc6",
+ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
+ "reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
"shasum": ""
},
"require": {
@@ -281,9 +281,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
- "source": "https://github.com/aws/aws-sdk-php/tree/3.275.5"
+ "source": "https://github.com/aws/aws-sdk-php/tree/3.275.7"
},
- "time": "2023-07-07T18:20:11+00:00"
+ "time": "2023-07-13T18:21:04+00:00"
},
{
"name": "aws/aws-sdk-php-laravel",
@@ -1939,16 +1939,16 @@
},
{
"name": "firebase/php-jwt",
- "version": "v6.8.0",
+ "version": "v6.8.1",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
- "reference": "48b0210c51718d682e53210c24d25c5a10a2299b"
+ "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/48b0210c51718d682e53210c24d25c5a10a2299b",
- "reference": "48b0210c51718d682e53210c24d25c5a10a2299b",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5dbc8959427416b8ee09a100d7a8588c00fb2e26",
+ "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26",
"shasum": ""
},
"require": {
@@ -1996,22 +1996,22 @@
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
- "source": "https://github.com/firebase/php-jwt/tree/v6.8.0"
+ "source": "https://github.com/firebase/php-jwt/tree/v6.8.1"
},
- "time": "2023-06-20T16:45:35+00:00"
+ "time": "2023-07-14T18:33:00+00:00"
},
{
"name": "fleetbase/core-api",
- "version": "1.1.3-alpha",
+ "version": "1.1.4-alpha",
"source": {
"type": "git",
"url": "https://github.com/fleetbase/core-api.git",
- "reference": "6551b4aa6800af5c27ab48c490503ca7c3e367d1"
+ "reference": "19388701609d02579138ba64f86e06688a608fa4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fleetbase/core-api/zipball/6551b4aa6800af5c27ab48c490503ca7c3e367d1",
- "reference": "6551b4aa6800af5c27ab48c490503ca7c3e367d1",
+ "url": "https://api.github.com/repos/fleetbase/core-api/zipball/19388701609d02579138ba64f86e06688a608fa4",
+ "reference": "19388701609d02579138ba64f86e06688a608fa4",
"shasum": ""
},
"require": {
@@ -2085,9 +2085,9 @@
],
"support": {
"issues": "https://github.com/fleetbase/core-api/issues",
- "source": "https://github.com/fleetbase/core-api/tree/v1.1.3-alpha"
+ "source": "https://github.com/fleetbase/core-api/tree/v1.1.4-alpha"
},
- "time": "2023-07-10T12:45:12+00:00"
+ "time": "2023-07-16T05:29:08+00:00"
},
{
"name": "fleetbase/fleetops-api",
@@ -2725,16 +2725,16 @@
},
{
"name": "giggsey/libphonenumber-for-php",
- "version": "8.13.15",
+ "version": "8.13.16",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
- "reference": "b294846e26ea985e6b1fbdfaf15387daca60c2de"
+ "reference": "7716e1c385f293416bc7bbd1ff4ec93b04a821e2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/b294846e26ea985e6b1fbdfaf15387daca60c2de",
- "reference": "b294846e26ea985e6b1fbdfaf15387daca60c2de",
+ "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/7716e1c385f293416bc7bbd1ff4ec93b04a821e2",
+ "reference": "7716e1c385f293416bc7bbd1ff4ec93b04a821e2",
"shasum": ""
},
"require": {
@@ -2793,7 +2793,7 @@
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php"
},
- "time": "2023-06-23T07:47:45+00:00"
+ "time": "2023-07-10T19:39:54+00:00"
},
{
"name": "giggsey/locale",
@@ -8310,16 +8310,16 @@
},
{
"name": "psy/psysh",
- "version": "v0.11.18",
+ "version": "v0.11.19",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec"
+ "reference": "1724ceff278daeeac5a006744633bacbb2dc4706"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
- "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1724ceff278daeeac5a006744633bacbb2dc4706",
+ "reference": "1724ceff278daeeac5a006744633bacbb2dc4706",
"shasum": ""
},
"require": {
@@ -8380,9 +8380,9 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.11.18"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.11.19"
},
- "time": "2023-05-23T02:31:11+00:00"
+ "time": "2023-07-15T19:42:19+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -14163,16 +14163,16 @@
},
{
"name": "filp/whoops",
- "version": "2.15.2",
+ "version": "2.15.3",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
- "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73"
+ "reference": "c83e88a30524f9360b11f585f71e6b17313b7187"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
- "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187",
+ "reference": "c83e88a30524f9360b11f585f71e6b17313b7187",
"shasum": ""
},
"require": {
@@ -14222,7 +14222,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
- "source": "https://github.com/filp/whoops/tree/2.15.2"
+ "source": "https://github.com/filp/whoops/tree/2.15.3"
},
"funding": [
{
@@ -14230,7 +14230,7 @@
"type": "github"
}
],
- "time": "2023-04-12T12:00:00+00:00"
+ "time": "2023-07-13T12:00:00+00:00"
},
{
"name": "hamcrest/hamcrest-php",
diff --git a/docker-compose.yml b/docker-compose.yml
index 633c9884..5bed89db 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -40,8 +40,6 @@ services:
target: app-dev
args:
ENVIRONMENT: development
- ports:
- - "8000:80"
environment:
DATABASE_URL: "mysql://root@database/fleetbase"
CACHE_DRIVER: redis
@@ -55,3 +53,14 @@ services:
depends_on:
- database
- cache
+
+ httpd:
+ volumes:
+ - ./api/storage:/var/www/html/api/storage
+ build:
+ context: .
+ dockerfile: docker/httpd/Dockerfile
+ ports:
+ - "8000:80"
+ depends_on:
+ - application
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b5e798d9..e5277003 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -90,8 +90,7 @@ CMD ["go-crond", "--verbose", "--no-auto", "root:./crontab"]
# Application dev stage
FROM base as app-dev
ENTRYPOINT ["docker-php-entrypoint"]
-EXPOSE 80
-CMD ["/startup.sh"]
+CMD ["php-fpm"]
# Events stage
FROM base as events
diff --git a/docker/httpd/vhost.conf b/docker/httpd/vhost.conf
index 0c9ad15a..561c66e4 100644
--- a/docker/httpd/vhost.conf
+++ b/docker/httpd/vhost.conf
@@ -4,7 +4,12 @@ server {
root /var/www/html/api/public;
# hide nginx version for security purposes
server_tokens off;
-
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error_log;
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
index index.php;
location / {
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644
index 59905790..00000000
--- a/nginx.conf
+++ /dev/null
@@ -1,46 +0,0 @@
-server {
- listen 80;
- server_name localhost;
- root /var/www/html/api/public;
- # hide nginx version for security purposes
- server_tokens off;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error_log;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- send_timeout 600;
-
- index index.php;
-
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
-
- location /uploads {
- alias /var/www/html/api/storage/app/uploads;
- autoindex on;
- try_files $uri $uri/ /index.php?$query_string;
- }
-
- location /storage {
- alias /var/www/html/api/storage/app/public;
- autoindex on;
- try_files $uri $uri/ /index.php?$query_string;
- }
-
- location ~ [^/]\.php(/|$) {
- fastcgi_split_path_info ^(.+?\.php)(/.*)$;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
-
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
-
- fastcgi_pass application:9000;
- fastcgi_index index.php;
- }
-}
\ No newline at end of file
diff --git a/packages/core-api b/packages/core-api
index 6551b4aa..19388701 160000
--- a/packages/core-api
+++ b/packages/core-api
@@ -1 +1 @@
-Subproject commit 6551b4aa6800af5c27ab48c490503ca7c3e367d1
+Subproject commit 19388701609d02579138ba64f86e06688a608fa4
diff --git a/startup.sh b/startup.sh
deleted file mode 100644
index 70e5313d..00000000
--- a/startup.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Start PHP-FPM in the background
-php-fpm -D
-status=$?
-if [ $status -ne 0 ]; then
- echo "Failed to start php-fpm: $status"
- exit $status
-fi
-
-# Start Nginx in the foreground
-nginx -g "daemon off;"
-status=$?
-if [ $status -ne 0 ]; then
- echo "Failed to start nginx: $status"
- exit $status
-fi
-
-# Naive check runs checks once a minute to see if either of the processes exited.
-while sleep 60; do
- ps aux | grep php-fpm | grep -q -v grep
- PROCESS_1_STATUS=$?
- ps aux |grep nginx |grep -q -v grep
- PROCESS_2_STATUS=$?
-
- if [ $PROCESS_1_STATUS -ne 0 ]; then
- echo "PHP-FPM process has already exited."
- exit 1
- fi
-
- if [ $PROCESS_2_STATUS -ne 0 ]; then
- echo "Nginx process has already exited."
- exit 1
- fi
-done