Compare commits

...

19 Commits

Author SHA1 Message Date
Ronald A. Richardson
bcb1470138 Added IAM Extension + Important bug fixes 2023-07-06 22:15:20 +08:00
Ronald A. Richardson
a5892a1cc4 updated github workflow for a discord announcement 2023-06-30 13:04:34 +08:00
Ronald A. Richardson
80c621d020 Added Branding Settings to Admin section 2023-06-30 11:36:14 +08:00
Ronald A. Richardson
21bccc1499 Updated FleetOps api/engine for critical patches and improvements 2023-06-19 16:29:56 +07:00
Ronald A. Richardson
ddd3d05f09 exclude socketcluster-client from fingerprint 2023-06-16 14:46:07 +08:00
Ronald A. Richardson
039033da47 added back load-socketcluster-client initializer 2023-06-16 14:36:54 +08:00
Ronald A. Richardson
3077b6df8c - Uses initializer from @fleetbase/ember-core to globally load socketcluster-client, now packages do not need to include as dependency\n- Upgraded @fleetbase/leaflet-routing-machine to v3.2.16 which introduces option to provide markerOptions to customize waypoint markers\n- Patched FleetOps extension so that waypoint map markers load 2023-06-16 14:12:34 +08:00
Ronald A. Richardson
b231a24edc bumped console to v0.1.1 2023-06-14 19:27:22 +08:00
Ronald A. Richardson
b3f87fc078 patch socketcluster-client resolve issue among packages and extensions on production build 2023-06-14 18:50:04 +08:00
Ronald A. Richardson
bb6c6cf9d5 Upgrade to all package dependencies, includes essential patches and hotfixes, added Extensions placeholder 2023-06-14 16:44:50 +08:00
Ronald A. Richardson
e8bc17c5b9 Update console with new Dashboard, Added Changelog, Added new SocketService for handling socket connections and listening, fleetbase-extensions-indexer now extracts custom fleetbase key from extension packages, <Layout::Sidebar /> is now collapsible, <Layout::Header /> can now accept custom nav items from argument, Patched <ModelSelect /> component to properly accept and handle customSearchEndpoint arg 2023-06-13 23:57:34 +08:00
Ronald A. Richardson
9b938e84c5 updated nginx config for timeout and logging 2023-06-11 12:15:05 +08:00
Ronald A. Richardson
672ac85d7d updated docker-compose.yml 2023-06-11 11:55:03 +08:00
Ronald A. Richardson
9decae6e26 set target as app-dev for application 2023-06-11 11:33:11 +08:00
Ronald A. Richardson
6d4d037d2f removed all shared volumes from docker environment - only use for dev, drop httpd container 2023-06-11 11:01:36 +08:00
Ronald A. Richardson
3969473b99 updated Dockerfile to handle permission issues and patch composer install and dump, as well as dependency updates for api 2023-06-09 16:08:38 +08:00
Ronald A. Richardson
cb23dda979 updated api to use fleetbase/core-api#v1.0.6-alpha 2023-06-09 12:39:23 +08:00
Ronald A. Richardson
8a2ce65763 updated fleetbase/core-api to v1.0.5-alpha to add server IP as CORS origin 2023-06-09 12:08:50 +08:00
Ronald A. Richardson
b4c4012557 updated console to v0.0.7 which includes window.crypto.randomUUID polyfill patch 2023-06-09 11:22:09 +08:00
23 changed files with 442 additions and 222 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: fleetbase

View File

@@ -0,0 +1,48 @@
name: Discord Announcement
on:
push:
tags:
- "v*"
jobs:
discord_announcement:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get tag message
id: tag
run: |
echo "::set-output name=version::$(git describe --tags --abbrev=0)"
if [[ "${ACT}" == "true" ]]; then
# If running with act, use an environment variable for the tag message
echo "::set-output name=message::$(echo -e "${TAG_MESSAGE}" | base64)"
else
# If running on GitHub, use git to get the tag message
echo "::set-output name=message::$(git tag -l --format='%(contents)' $(git describe --tags --abbrev=0) | base64)"
fi
- name: Print tag message
run: echo "${{ steps.tag.outputs.message }}"
- name: Get tag name
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF/refs\/tags\//}"
- name: Decode message
id: decode
run: |
echo "Decoding message..."
echo "::set-output name=message::$(echo '${{ steps.tag.outputs.message }}' | base64 --decode)"
- name: Send message to Discord
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "@everyone \n📦 New Fleetbase Version ${{ steps.get_tag.outputs.tag }} Released!\n${{ steps.decode.outputs.message }} \nVersion: ${{ steps.get_tag.outputs.tag }} \n[Release Notes for ${{ steps.get_tag.outputs.tag }}](https://github.com/fleetbase/fleetbase/releases/tag/${{ steps.get_tag.outputs.tag }})"
username: Fleetbase

3
.gitignore vendored
View File

@@ -11,4 +11,5 @@ api/public/storage
api/storage/*.key
api/storage/uploads
api/storage/public
api/vendor
api/vendor
act.sh

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if [ -f composer.lock ]; then
rm composer.lock
fi
mv composer.json composer.prod.json && mv composer.dev.json composer.json && composer install && mv composer.json composer.dev.json && mv composer.prod.json composer.json

85
api/composer.dev.json Normal file
View File

@@ -0,0 +1,85 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"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",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "^3.1",
"phpoffice/phpspreadsheet": "^1.28",
"predis/predis": "^2.1",
"psr/http-factory-implementation": "*",
"textalk/websocket": "^1.6"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^6.10",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"repositories": [
{
"type": "path",
"url": "../packages/core-api"
},
{
"type": "path",
"url": "../packages/fleetops-api"
},
{
"type": "path",
"url": "../packages/storefront-api"
}
],
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": ["Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi"],
"post-update-cmd": ["@php artisan vendor:publish --tag=laravel-assets --ansi --force"],
"post-root-package-install": ["@php -r \"file_exists('.env') || copy('.env.example', '.env');\""],
"post-create-project-cmd": ["@php artisan key:generate --ansi"],
"clear-logs": ["rm -rf storage/logs/*.log", "composer dump-autoload", "chmod -R 777 storage", "chmod -R 777 bootstrap/cache", "chmod -R 777 resources"],
"clean-logs": ["composer run-script clear-logs"],
"dock": ["docker exec -it fleetbase_os_application_1 /usr/bin/tmux -u new"],
"dock-server": ["docker exec -it fleetbase_os_httpd_1 /bin/sh"],
"tunnel": ["ngrok http --region=ap --hostname=fleetbase.ap.ngrok.io 8000"]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

View File

@@ -2,13 +2,16 @@
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fleetbase/core-api": "^1.0.4-alpha",
"fleetbase/fleetops-api": "^1.0.2-alpha",
"fleetbase/storefront-api": "^1.0.1-alpha",
"fleetbase/core-api": "^1.1.2-alpha",
"fleetbase/fleetops-api": "^1.0.6-alpha",
"fleetbase/storefront-api": "^1.0.5-alpha",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",

330
api/composer.lock generated
View File

@@ -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": "24e0d146c25254e3bbe1f05d76efd3ed",
"content-hash": "856cd878eb92ddb0b3fb98d8e1069ce8",
"packages": [
{
"name": "aloha/twilio",
@@ -192,16 +192,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.271.10",
"version": "3.275.3",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "f8b191d1ab23dfdd1131017a6bfc58198fcd9393"
"reference": "bbdf8e8d5df0b44ee83d5a751f316fc9f9dd2849"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f8b191d1ab23dfdd1131017a6bfc58198fcd9393",
"reference": "f8b191d1ab23dfdd1131017a6bfc58198fcd9393",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/bbdf8e8d5df0b44ee83d5a751f316fc9f9dd2849",
"reference": "bbdf8e8d5df0b44ee83d5a751f316fc9f9dd2849",
"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.271.10"
"source": "https://github.com/aws/aws-sdk-php/tree/3.275.3"
},
"time": "2023-06-07T18:21:43+00:00"
"time": "2023-07-05T18:22:08+00:00"
},
{
"name": "aws/aws-sdk-php-laravel",
@@ -1319,28 +1319,28 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.6",
"version": "2.0.8",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024"
"reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
"reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
"reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^10",
"doctrine/coding-standard": "^11.0",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "^8.5 || ^9.5",
"vimeo/psalm": "^4.25"
"vimeo/psalm": "^4.25 || ^5.4"
},
"type": "library",
"autoload": {
@@ -1390,7 +1390,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
"source": "https://github.com/doctrine/inflector/tree/2.0.6"
"source": "https://github.com/doctrine/inflector/tree/2.0.8"
},
"funding": [
{
@@ -1406,7 +1406,7 @@
"type": "tidelift"
}
],
"time": "2022-10-20T09:10:12+00:00"
"time": "2023-06-16T13:40:37+00:00"
},
{
"name": "doctrine/lexer",
@@ -1939,16 +1939,16 @@
},
{
"name": "firebase/php-jwt",
"version": "v6.5.0",
"version": "v6.8.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
"reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2"
"reference": "48b0210c51718d682e53210c24d25c5a10a2299b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/e94e7353302b0c11ec3cfff7180cd0b1743975d2",
"reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/48b0210c51718d682e53210c24d25c5a10a2299b",
"reference": "48b0210c51718d682e53210c24d25c5a10a2299b",
"shasum": ""
},
"require": {
@@ -1996,22 +1996,22 @@
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
"source": "https://github.com/firebase/php-jwt/tree/v6.5.0"
"source": "https://github.com/firebase/php-jwt/tree/v6.8.0"
},
"time": "2023-05-12T15:47:07+00:00"
"time": "2023-06-20T16:45:35+00:00"
},
{
"name": "fleetbase/core-api",
"version": "1.0.4-alpha",
"version": "1.1.2-alpha",
"source": {
"type": "git",
"url": "https://github.com/fleetbase/core-api.git",
"reference": "99713f25dfcf3b86b5826f3b8e2c84acf6e83992"
"reference": "d0715ae4919bde139cf36714a20ee6bca164e61c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fleetbase/core-api/zipball/99713f25dfcf3b86b5826f3b8e2c84acf6e83992",
"reference": "99713f25dfcf3b86b5826f3b8e2c84acf6e83992",
"url": "https://api.github.com/repos/fleetbase/core-api/zipball/d0715ae4919bde139cf36714a20ee6bca164e61c",
"reference": "d0715ae4919bde139cf36714a20ee6bca164e61c",
"shasum": ""
},
"require": {
@@ -2085,35 +2085,29 @@
],
"support": {
"issues": "https://github.com/fleetbase/core-api/issues",
"source": "https://github.com/fleetbase/core-api/tree/v1.0.4-alpha"
"source": "https://github.com/fleetbase/core-api/tree/v1.1.2-alpha"
},
"funding": [
{
"url": "https://github.com/fleetbase",
"type": "github"
}
],
"time": "2023-06-08T10:31:10+00:00"
"time": "2023-07-06T13:57:49+00:00"
},
{
"name": "fleetbase/fleetops-api",
"version": "1.0.2-alpha",
"version": "1.0.6-alpha",
"source": {
"type": "git",
"url": "https://github.com/fleetbase/fleetops-api.git",
"reference": "a6a9eab63eb651f8833874c2ee34739c4b8f1d9b"
"reference": "02238ff3be00b0329b1cb99b1bea844b0936a523"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fleetbase/fleetops-api/zipball/a6a9eab63eb651f8833874c2ee34739c4b8f1d9b",
"reference": "a6a9eab63eb651f8833874c2ee34739c4b8f1d9b",
"url": "https://api.github.com/repos/fleetbase/fleetops-api/zipball/02238ff3be00b0329b1cb99b1bea844b0936a523",
"reference": "02238ff3be00b0329b1cb99b1bea844b0936a523",
"shasum": ""
},
"require": {
"barryvdh/laravel-dompdf": "^2.0",
"brick/geo": "0.7.2",
"cknow/laravel-money": "^7.1",
"fleetbase/core-api": "^1.0.0-alpha",
"fleetbase/core-api": "^1.0.9-alpha",
"geocoder-php/google-maps-places-provider": "^1.4",
"giggsey/libphonenumber-for-php": "^8.13",
"league/geotools": "^1.1.0",
@@ -2161,39 +2155,34 @@
"description": "FleetOps TMS and Last-Mile Operations System",
"keywords": [
"delivery management",
"fleetbase-extension",
"fleetops",
"last-mile",
"tms"
],
"support": {
"issues": "https://github.com/fleetbase/fleetops-api/issues",
"source": "https://github.com/fleetbase/fleetops-api/tree/v1.0.2-alpha"
"source": "https://github.com/fleetbase/fleetops-api/tree/v1.0.6-alpha"
},
"funding": [
{
"url": "https://github.com/fleetbase",
"type": "github"
}
],
"time": "2023-06-08T10:35:17+00:00"
"time": "2023-07-06T13:58:31+00:00"
},
{
"name": "fleetbase/storefront-api",
"version": "1.0.1-alpha",
"version": "1.0.5-alpha",
"source": {
"type": "git",
"url": "https://github.com/fleetbase/storefront-api.git",
"reference": "0d0dee2b8a173757e0f4e5c4e12c98d6d6dda37e"
"reference": "59ceacc658a919303c6d4092c5572f41fd131d54"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fleetbase/storefront-api/zipball/0d0dee2b8a173757e0f4e5c4e12c98d6d6dda37e",
"reference": "0d0dee2b8a173757e0f4e5c4e12c98d6d6dda37e",
"url": "https://api.github.com/repos/fleetbase/storefront-api/zipball/59ceacc658a919303c6d4092c5572f41fd131d54",
"reference": "59ceacc658a919303c6d4092c5572f41fd131d54",
"shasum": ""
},
"require": {
"fleetbase/core-api": "^1.0.0-alpha",
"fleetbase/fleetops-api": "^1.0.0-alpha",
"fleetbase/core-api": "^1.1.0-alpha",
"fleetbase/fleetops-api": "^1.0.4-alpha",
"geocoder-php/google-maps-places-provider": "^1.4",
"laravel-notification-channels/apn": "^3.8",
"laravel-notification-channels/fcm": "^2.7",
@@ -2245,21 +2234,16 @@
"description": "Headless Commerce API for Storefront Fleetbase Extension.",
"keywords": [
"e-commerce",
"fleetbase-extension",
"headless commerce",
"marketplace",
"storefront"
],
"support": {
"issues": "https://github.com/fleetbase/storefront-api/issues",
"source": "https://github.com/fleetbase/storefront-api/tree/v1.0.1-alpha"
"source": "https://github.com/fleetbase/storefront-api/tree/v1.0.5-alpha"
},
"funding": [
{
"url": "https://github.com/fleetbase",
"type": "github"
}
],
"time": "2023-05-26T04:39:13+00:00"
"time": "2023-07-06T14:02:36+00:00"
},
{
"name": "fruitcake/laravel-cors",
@@ -2741,16 +2725,16 @@
},
{
"name": "giggsey/libphonenumber-for-php",
"version": "8.13.13",
"version": "8.13.15",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
"reference": "a8996558d694b1437678d27de80e37620367b8de"
"reference": "b294846e26ea985e6b1fbdfaf15387daca60c2de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/a8996558d694b1437678d27de80e37620367b8de",
"reference": "a8996558d694b1437678d27de80e37620367b8de",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/b294846e26ea985e6b1fbdfaf15387daca60c2de",
"reference": "b294846e26ea985e6b1fbdfaf15387daca60c2de",
"shasum": ""
},
"require": {
@@ -2809,7 +2793,7 @@
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php"
},
"time": "2023-06-05T07:39:05+00:00"
"time": "2023-06-23T07:47:45+00:00"
},
{
"name": "giggsey/locale",
@@ -2925,26 +2909,26 @@
},
{
"name": "google/cloud-core",
"version": "v1.51.2",
"version": "v1.52.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-core.git",
"reference": "85dc48d62143f4bbfaa34c24da95003371de7b79"
"reference": "bd87e418923e0d836c7e754d82e66bc0b79964ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/85dc48d62143f4bbfaa34c24da95003371de7b79",
"reference": "85dc48d62143f4bbfaa34c24da95003371de7b79",
"url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/bd87e418923e0d836c7e754d82e66bc0b79964ab",
"reference": "bd87e418923e0d836c7e754d82e66bc0b79964ab",
"shasum": ""
},
"require": {
"google/auth": "^1.18",
"guzzlehttp/guzzle": "^5.3|^6.5.7|^7.4.4",
"guzzlehttp/promises": "^1.3",
"guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^1.7|^2.0",
"monolog/monolog": "^1.1|^2.0|^3.0",
"php": ">=7.4",
"psr/http-message": "^1.0",
"psr/http-message": "^1.0|^2.0",
"rize/uri-template": "~0.3"
},
"require-dev": {
@@ -2984,26 +2968,26 @@
],
"description": "Google Cloud PHP shared dependency, providing functionality useful to all components.",
"support": {
"source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.51.2"
"source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.52.0"
},
"time": "2023-05-05T23:01:42+00:00"
"time": "2023-06-21T21:05:25+00:00"
},
{
"name": "google/cloud-storage",
"version": "v1.31.2",
"version": "v1.32.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-storage.git",
"reference": "7fe96d56856cda550b21779bb95a066b264852da"
"reference": "2dd5cee0da51e94bcf39c0af9cefd0ec6b931685"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/7fe96d56856cda550b21779bb95a066b264852da",
"reference": "7fe96d56856cda550b21779bb95a066b264852da",
"url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/2dd5cee0da51e94bcf39c0af9cefd0ec6b931685",
"reference": "2dd5cee0da51e94bcf39c0af9cefd0ec6b931685",
"shasum": ""
},
"require": {
"google/cloud-core": "^1.51.1",
"google/cloud-core": "^1.51.3",
"google/crc32": "^0.2.0",
"php": ">=7.4",
"ramsey/uuid": "^4.2.3"
@@ -3041,9 +3025,9 @@
],
"description": "Cloud Storage Client for PHP",
"support": {
"source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.31.2"
"source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.32.0"
},
"time": "2023-05-05T23:01:42+00:00"
"time": "2023-06-21T21:05:25+00:00"
},
{
"name": "google/crc32",
@@ -3897,16 +3881,16 @@
},
{
"name": "kreait/firebase-php",
"version": "6.9.5",
"version": "6.9.6",
"source": {
"type": "git",
"url": "https://github.com/kreait/firebase-php.git",
"reference": "e64ce87a2d3be0acef91c33aea6269bbd528b12f"
"reference": "d6592be9b27a7c0b13f484f5af494e278901e441"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kreait/firebase-php/zipball/e64ce87a2d3be0acef91c33aea6269bbd528b12f",
"reference": "e64ce87a2d3be0acef91c33aea6269bbd528b12f",
"url": "https://api.github.com/repos/kreait/firebase-php/zipball/d6592be9b27a7c0b13f484f5af494e278901e441",
"reference": "d6592be9b27a7c0b13f484f5af494e278901e441",
"shasum": ""
},
"require": {
@@ -3926,7 +3910,6 @@
"mtdowling/jmespath.php": "^2.6.1",
"php": "^7.4|^8.0",
"psr/cache": "^1.0.1|^2.0|^3.0",
"psr/http-message": "^1.0.1",
"psr/log": "^1.1|^2.0|^3.0",
"riverline/multipart-parser": "^2.0.8",
"symfony/polyfill-php80": "^1.23",
@@ -3987,7 +3970,7 @@
"type": "github"
}
],
"time": "2023-01-27T09:30:40+00:00"
"time": "2023-06-10T06:44:56+00:00"
},
{
"name": "kreait/firebase-tokens",
@@ -6137,16 +6120,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.67.0",
"version": "2.68.1",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8"
"reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8",
"reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da",
"reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da",
"shasum": ""
},
"require": {
@@ -6235,7 +6218,7 @@
"type": "tidelift"
}
],
"time": "2023-05-25T22:09:47+00:00"
"time": "2023-06-20T18:29:04+00:00"
},
{
"name": "nette/caching",
@@ -6525,16 +6508,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.15.5",
"version": "v4.16.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
"reference": "19526a33fb561ef417e822e85f08a00db4059c17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
"reference": "19526a33fb561ef417e822e85f08a00db4059c17",
"shasum": ""
},
"require": {
@@ -6575,9 +6558,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
},
"time": "2023-05-19T20:20:00+00:00"
"time": "2023-06-25T14:52:30+00:00"
},
{
"name": "opis/closure",
@@ -7174,16 +7157,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.28.0",
"version": "1.29.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a"
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
"reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"shasum": ""
},
"require": {
@@ -7201,7 +7184,7 @@
"ext-zip": "*",
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
"maennchen/zipstream-php": "^2.1",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^7.4 || ^8.0",
@@ -7213,12 +7196,12 @@
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^1.0 || ^2.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.2.4",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"phpunit/phpunit": "^8.5 || ^9.0 || ^10.0",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
@@ -7273,9 +7256,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0"
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0"
},
"time": "2023-02-25T12:24:49+00:00"
"time": "2023-06-14T22:48:31+00:00"
},
{
"name": "phpoption/phpoption",
@@ -7810,16 +7793,16 @@
},
{
"name": "predis/predis",
"version": "v2.1.2",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/predis/predis.git",
"reference": "a77a43913a74f9331f637bb12867eb8e274814e5"
"reference": "33b70b971a32b0d28b4f748b0547593dce316e0d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/predis/predis/zipball/a77a43913a74f9331f637bb12867eb8e274814e5",
"reference": "a77a43913a74f9331f637bb12867eb8e274814e5",
"url": "https://api.github.com/repos/predis/predis/zipball/33b70b971a32b0d28b4f748b0547593dce316e0d",
"reference": "33b70b971a32b0d28b4f748b0547593dce316e0d",
"shasum": ""
},
"require": {
@@ -7830,6 +7813,9 @@
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^8.0 || ~9.4.4"
},
"suggest": {
"ext-relay": "Faster connection with in-memory caching (>=0.6.2)"
},
"type": "library",
"autoload": {
"psr-4": {
@@ -7856,7 +7842,7 @@
],
"support": {
"issues": "https://github.com/predis/predis/issues",
"source": "https://github.com/predis/predis/tree/v2.1.2"
"source": "https://github.com/predis/predis/tree/v2.2.0"
},
"funding": [
{
@@ -7864,7 +7850,7 @@
"type": "github"
}
],
"time": "2023-03-02T18:32:04+00:00"
"time": "2023-06-14T10:37:31+00:00"
},
{
"name": "psr/cache",
@@ -9172,16 +9158,16 @@
},
{
"name": "spatie/laravel-permission",
"version": "5.10.1",
"version": "5.10.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-permission.git",
"reference": "d08b3ffc5870cce4a47a39f22174947b33c191ae"
"reference": "671e46e079cbd4990a98427daaa09f4977b57ca9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/d08b3ffc5870cce4a47a39f22174947b33c191ae",
"reference": "d08b3ffc5870cce4a47a39f22174947b33c191ae",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/671e46e079cbd4990a98427daaa09f4977b57ca9",
"reference": "671e46e079cbd4990a98427daaa09f4977b57ca9",
"shasum": ""
},
"require": {
@@ -9242,7 +9228,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-permission/issues",
"source": "https://github.com/spatie/laravel-permission/tree/5.10.1"
"source": "https://github.com/spatie/laravel-permission/tree/5.10.2"
},
"funding": [
{
@@ -9250,7 +9236,7 @@
"type": "github"
}
],
"time": "2023-04-12T17:08:32+00:00"
"time": "2023-07-04T13:38:13+00:00"
},
{
"name": "spatie/laravel-responsecache",
@@ -9644,16 +9630,16 @@
},
{
"name": "symfony/cache",
"version": "v5.4.23",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
"reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107"
"reference": "e2013521c0f07473ae69a01fce0af78fc3ec0f23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107",
"reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107",
"url": "https://api.github.com/repos/symfony/cache/zipball/e2013521c0f07473ae69a01fce0af78fc3ec0f23",
"reference": "e2013521c0f07473ae69a01fce0af78fc3ec0f23",
"shasum": ""
},
"require": {
@@ -9721,7 +9707,7 @@
"psr6"
],
"support": {
"source": "https://github.com/symfony/cache/tree/v5.4.23"
"source": "https://github.com/symfony/cache/tree/v5.4.25"
},
"funding": [
{
@@ -9737,7 +9723,7 @@
"type": "tidelift"
}
],
"time": "2023-04-21T15:38:51+00:00"
"time": "2023-06-22T08:06:06+00:00"
},
{
"name": "symfony/cache-contracts",
@@ -10350,16 +10336,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5"
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"shasum": ""
},
"require": {
@@ -10406,7 +10392,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.24"
"source": "https://github.com/symfony/http-foundation/tree/v5.4.25"
},
"funding": [
{
@@ -10422,20 +10408,20 @@
"type": "tidelift"
}
],
"time": "2023-05-19T07:21:23+00:00"
"time": "2023-06-22T08:06:06+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1"
"reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"shasum": ""
},
"require": {
@@ -10518,7 +10504,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.4.24"
"source": "https://github.com/symfony/http-kernel/tree/v5.4.25"
},
"funding": [
{
@@ -10534,7 +10520,7 @@
"type": "tidelift"
}
],
"time": "2023-05-27T08:06:30+00:00"
"time": "2023-06-26T05:58:08+00:00"
},
{
"name": "symfony/mime",
@@ -11829,16 +11815,16 @@
},
{
"name": "symfony/routing",
"version": "v5.4.22",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d"
"reference": "56bfc1394f7011303eb2e22724f9b422d3f14649"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d",
"url": "https://api.github.com/repos/symfony/routing/zipball/56bfc1394f7011303eb2e22724f9b422d3f14649",
"reference": "56bfc1394f7011303eb2e22724f9b422d3f14649",
"shasum": ""
},
"require": {
@@ -11899,7 +11885,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v5.4.22"
"source": "https://github.com/symfony/routing/tree/v5.4.25"
},
"funding": [
{
@@ -11915,20 +11901,20 @@
"type": "tidelift"
}
],
"time": "2023-03-14T14:59:20+00:00"
"time": "2023-06-05T14:18:47+00:00"
},
{
"name": "symfony/serializer",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/serializer.git",
"reference": "12535bb7b1d3b53802bf18d61a98bb1145fabcdb"
"reference": "e528ace5951925459cb6620cc4d67c20ed616fdd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/serializer/zipball/12535bb7b1d3b53802bf18d61a98bb1145fabcdb",
"reference": "12535bb7b1d3b53802bf18d61a98bb1145fabcdb",
"url": "https://api.github.com/repos/symfony/serializer/zipball/e528ace5951925459cb6620cc4d67c20ed616fdd",
"reference": "e528ace5951925459cb6620cc4d67c20ed616fdd",
"shasum": ""
},
"require": {
@@ -12002,7 +11988,7 @@
"description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/serializer/tree/v5.4.24"
"source": "https://github.com/symfony/serializer/tree/v5.4.25"
},
"funding": [
{
@@ -12018,7 +12004,7 @@
"type": "tidelift"
}
],
"time": "2023-05-12T08:37:35+00:00"
"time": "2023-05-31T11:43:23+00:00"
},
{
"name": "symfony/service-contracts",
@@ -12366,16 +12352,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3"
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede",
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede",
"shasum": ""
},
"require": {
@@ -12434,7 +12420,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.24"
"source": "https://github.com/symfony/var-dumper/tree/v5.4.25"
},
"funding": [
{
@@ -12450,7 +12436,7 @@
"type": "tidelift"
}
],
"time": "2023-05-25T13:05:00+00:00"
"time": "2023-06-20T20:56:26+00:00"
},
{
"name": "symfony/var-exporter",
@@ -13592,16 +13578,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.6.3",
"version": "3.6.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a"
"reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/9a747d29e7e6b39509b8f1847e37a23a0163ea6a",
"reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f",
"reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f",
"shasum": ""
},
"require": {
@@ -13684,7 +13670,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.6.3"
"source": "https://github.com/doctrine/dbal/tree/3.6.4"
},
"funding": [
{
@@ -13700,7 +13686,7 @@
"type": "tidelift"
}
],
"time": "2023-06-01T05:46:46+00:00"
"time": "2023-06-15T07:40:12+00:00"
},
{
"name": "doctrine/deprecations",
@@ -14109,16 +14095,16 @@
},
{
"name": "fakerphp/faker",
"version": "v1.22.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/FakerPHP/Faker.git",
"reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2"
"reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2",
"reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
"reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
"shasum": ""
},
"require": {
@@ -14171,9 +14157,9 @@
],
"support": {
"issues": "https://github.com/FakerPHP/Faker/issues",
"source": "https://github.com/FakerPHP/Faker/tree/v1.22.0"
"source": "https://github.com/FakerPHP/Faker/tree/v1.23.0"
},
"time": "2023-05-14T12:31:37+00:00"
"time": "2023-06-12T08:44:38+00:00"
},
{
"name": "filp/whoops",
@@ -15087,16 +15073,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.6.8",
"version": "9.6.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e"
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e",
"reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
"shasum": ""
},
"require": {
@@ -15170,7 +15156,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
},
"funding": [
{
@@ -15186,7 +15172,7 @@
"type": "tidelift"
}
],
"time": "2023-05-11T05:14:45+00:00"
"time": "2023-06-11T06:13:56+00:00"
},
{
"name": "sebastian/cli-parser",

Submodule console updated: 3985be5172...f6dd21184b

View File

@@ -38,14 +38,14 @@ services:
ENVIRONMENT: development
application:
volumes:
- .:/var/www/html
build:
context: .
dockerfile: docker/Dockerfile
target: app-dev
args:
ENVIRONMENT: development
ports:
- "8000:80"
environment:
DATABASE_URL: "mysql://root@database/fleetbase"
CACHE_DRIVER: redis
@@ -58,18 +58,4 @@ services:
LOG_CHANNEL: daily
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
volumes:
storage:
- cache

View File

@@ -8,9 +8,9 @@ RUN mkdir -p /usr/src/php/ext \
# Install required packages and PHP extensions
RUN apt-get update \
&& apt-get install -y git unzip libzip-dev libgd-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
&& apt-get install -y nano git unzip libzip-dev libgd-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
imagemagick libmagickwand-dev --no-install-recommends libmemcached-dev libgeos-dev libgmp-dev \
default-mysql-client libicu-dev tmux \
default-mysql-client libicu-dev tmux nginx dnsutils \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-configure gd --with-external-gd \
@@ -19,6 +19,9 @@ RUN apt-get update \
&& pecl install redis-4.3.0 memcached-3.1.3 \
&& docker-php-ext-enable redis memcached opcache bcmath
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Update PHP configurations
RUN sed -e 's/^expose_php.*/expose_php = Off/' "$PHP_INI_DIR/php.ini-production" > "$PHP_INI_DIR/php.ini" \
&& sed -i -e 's/^upload_max_filesize.*/upload_max_filesize = 600M/' -e 's/^post_max_size.*/post_max_size = 0/' \
@@ -30,29 +33,44 @@ RUN curl -L https://github.com/springload/ssm-parent/releases/download/v1.4.3/ss
&& rm /tmp/ssm-parent.tar.gz
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# For development only
WORKDIR /var/www/html
COPY --chown=www-data:nogroup packages ./
# Setup application
WORKDIR /var/www/html/api
# Copy application files
COPY --chown=www-data:www-data api ./
COPY --chown=www-data:nogroup api ./
RUN chown -R www-data:www-data /var/www/html/api
RUN chown -R www-data:www-data /var/www/html/api/bootstrap/cache
RUN chmod -R 755 /var/www/html/api/storage
RUN chmod -R 755 /var/www/html/api/bootstrap/cache
RUN mkdir -p ./storage/logs/ && ln -sf /dev/stdout ./storage/logs/laravel-$(date +'%Y-%m-%d').log
USER www-data
# Install Composer dependencies
RUN composer install --no-dev --no-scripts --no-autoloader
RUN composer install
RUN composer dumpautoload
# Continue
USER root
WORKDIR /
# Copy nginx config
COPY nginx.conf /etc/nginx/sites-enabled/default
# Copy the startup script into the Docker image
COPY startup.sh /startup.sh
# Make sure the script is executable
RUN chmod +x /startup.sh
# Create unique instance ID
RUN echo $(cat /proc/sys/kernel/random/uuid) > /.fleetbase
# Set environment
ARG ENVIRONMENT=production
ENV APP_ENV=$ENVIRONMENT
# Set workdir to application
WORKDIR /var/www/html/api
# Scheduler base stage
FROM base as scheduler-base
@@ -73,13 +91,14 @@ CMD ["go-crond", "--verbose", "--no-auto", "root:./crontab"]
# Application dev stage
FROM base as app-dev
ENTRYPOINT ["docker-php-entrypoint"]
CMD ["php-fpm"]
ENTRYPOINT ["docker-php-entrypoint"]
EXPOSE 80
CMD ["/startup.sh"]
# Events stage
FROM base as events
ENTRYPOINT ["/sbin/ssm-parent", "-c", ".ssm-parent.yaml", "run", "--", "docker-php-entrypoint"]
CMD ["php", "artisan", "queue:work", "events"]
CMD ["php", "artisan", "queue:work", "events"]2
# Jobs stage
FROM base as jobs
@@ -89,4 +108,5 @@ CMD ["php", "artisan", "queue:work", "sqs"]
# Application stage
FROM base as app
ENTRYPOINT ["/sbin/ssm-parent", "-c", ".ssm-parent.yaml", "run", "--", "docker-php-entrypoint"]
CMD ["php-fpm"]
EXPOSE 80
CMD ["/startup.sh"]

46
nginx.conf Normal file
View File

@@ -0,0 +1,46 @@
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;
}
}

35
startup.sh Normal file
View File

@@ -0,0 +1,35 @@
#!/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