mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-08 07:16:49 +00:00
Compare commits
25 Commits
feature-re
...
v0.5.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04bdb52c08 | ||
|
|
8e5a45dd09 | ||
|
|
196af155ae | ||
|
|
056a717d08 | ||
|
|
fd008d7f73 | ||
|
|
451c95d0f0 | ||
|
|
b267b303cf | ||
|
|
441b4f3f0c | ||
|
|
0e4d4a7c8c | ||
|
|
24392527e0 | ||
|
|
c19d838757 | ||
|
|
3a072c1524 | ||
|
|
0c96386cf1 | ||
|
|
708babb81c | ||
|
|
8c8acf1e43 | ||
|
|
e853e2ca22 | ||
|
|
dacaff37ca | ||
|
|
b0460963e5 | ||
|
|
9ec786d892 | ||
|
|
76859aeb26 | ||
|
|
1764b804de | ||
|
|
0c33018b5b | ||
|
|
72b1b9b764 | ||
|
|
aee552f518 | ||
|
|
9967f27c83 |
18
.github/workflows/cd.yml
vendored
18
.github/workflows/cd.yml
vendored
@@ -109,13 +109,13 @@ jobs:
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 8
|
||||
version: 9.5.0
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm Store Directory
|
||||
@@ -139,6 +139,20 @@ jobs:
|
||||
fi
|
||||
working-directory: ./console
|
||||
|
||||
- name: Set Env Variables for QA
|
||||
if: startsWith(github.ref, 'refs/heads/deploy/qa')
|
||||
run: |
|
||||
echo "STRIPE_KEY=${{ secrets.STRIPE_TEST_KEY }}" >> ./environments/.env.production
|
||||
echo "EXTENSIONS=@fleetbase/billing-engine,@fleetbase/internals-engine" >> ./environments/.env.production
|
||||
working-directory: ./console
|
||||
|
||||
- name: Set Env Variables for Production
|
||||
if: startsWith(github.ref, 'refs/heads/deploy/production')
|
||||
run: |
|
||||
echo "STRIPE_KEY=${{ secrets.STRIPE_KEY }}" >> ./environments/.env.production
|
||||
echo "EXTENSIONS=@fleetbase/billing-engine,@fleetbase/internals-engine" >> ./environments/.env.production
|
||||
working-directory: ./console
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./console
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -36,3 +36,9 @@
|
||||
[submodule "docs"]
|
||||
path = docs
|
||||
url = git@github.com:fleetbase/docs.git
|
||||
[submodule "packages/registry-bridge"]
|
||||
path = packages/registry-bridge
|
||||
url = git@github.com:fleetbase/registry-bridge.git
|
||||
[submodule "packages/ledger"]
|
||||
path = packages/ledger
|
||||
url = git@github.com:fleetbase/ledger.git
|
||||
|
||||
15
Caddyfile
15
Caddyfile
@@ -1,19 +1,14 @@
|
||||
{
|
||||
frankenphp
|
||||
frankenphp {
|
||||
num_threads 24
|
||||
}
|
||||
order php_server before file_server
|
||||
}
|
||||
|
||||
http://:8000 {
|
||||
root * /fleetbase/api/public
|
||||
encode zstd gzip
|
||||
encode zstd br gzip
|
||||
php_server {
|
||||
resolve_root_symlink
|
||||
}
|
||||
}
|
||||
|
||||
http://:4201 {
|
||||
root * /fleetbase/console/dist
|
||||
try_files {path} /
|
||||
encode zstd gzip
|
||||
file_server
|
||||
}
|
||||
}
|
||||
19
Caddyfile.console
Normal file
19
Caddyfile.console
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
frankenphp
|
||||
order php_server before file_server
|
||||
}
|
||||
|
||||
http://:8000 {
|
||||
root * /fleetbase/api/public
|
||||
encode zstd gzip
|
||||
php_server {
|
||||
resolve_root_symlink
|
||||
}
|
||||
}
|
||||
|
||||
http://:4200 {
|
||||
root * /fleetbase/console/dist
|
||||
try_files {path} /
|
||||
encode zstd gzip
|
||||
file_server
|
||||
}
|
||||
@@ -9,9 +9,10 @@
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"fleetbase/core-api": "^1.4.27",
|
||||
"fleetbase/fleetops-api": "^0.5.3",
|
||||
"fleetbase/storefront-api": "^0.3.12",
|
||||
"fleetbase/core-api": "^1.5.1",
|
||||
"fleetbase/fleetops-api": "^0.5.5",
|
||||
"fleetbase/registry-bridge": "^0.0.11",
|
||||
"fleetbase/storefront-api": "^0.3.13",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/octane": "^2.3",
|
||||
@@ -36,6 +37,10 @@
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/laravel-model-caching"
|
||||
},
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://registry.fleetbase.io"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
|
||||
843
api/composer.lock
generated
843
api/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -23,3 +23,6 @@ php artisan schedule-monitor:sync
|
||||
|
||||
# Clear cache
|
||||
php artisan cache:clear
|
||||
|
||||
# Initialize registry
|
||||
php artisan registry:init
|
||||
|
||||
54
console/Dockerfile.server-build
Normal file
54
console/Dockerfile.server-build
Normal file
@@ -0,0 +1,54 @@
|
||||
# ---- Build Stage ----
|
||||
FROM node:18.15.0-alpine as builder
|
||||
|
||||
# Set the working directory in the container to /console
|
||||
WORKDIR /console
|
||||
|
||||
# Create the pnpm directory and set the PNPM_HOME environment variable
|
||||
RUN mkdir -p ~/.pnpm
|
||||
ENV PNPM_HOME /root/.pnpm
|
||||
|
||||
# Set environment
|
||||
ARG ENVIRONMENT=production
|
||||
|
||||
# Add the pnpm global bin to the PATH
|
||||
ENV PATH /root/.pnpm/bin:$PATH
|
||||
|
||||
# Copy pnpm-lock.yaml (or package.json) into the directory /console in the container
|
||||
COPY console/package.json console/pnpm-lock.yaml ./
|
||||
|
||||
# Copy over .npmrc if applicable
|
||||
COPY console/.npmr[c] ./
|
||||
|
||||
# Install global dependencies
|
||||
RUN npm install -g ember-cli pnpm
|
||||
|
||||
# Install git
|
||||
RUN apk update && apk add git openssh-client
|
||||
|
||||
# Trust GitHub's RSA host key
|
||||
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
|
||||
# Install app dependencies
|
||||
RUN pnpm install
|
||||
|
||||
# Copy the console directory contents into the container at /console
|
||||
COPY console .
|
||||
|
||||
# Build the application
|
||||
RUN pnpm build --environment $ENVIRONMENT
|
||||
|
||||
# ---- Serve Stage ----
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy the built app to our served directory
|
||||
COPY --from=builder /console/dist /usr/share/nginx/html
|
||||
|
||||
# Expose the port nginx is bound to
|
||||
EXPOSE 4200
|
||||
|
||||
# Use custom nginx.conf
|
||||
COPY console/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Start Nginx server
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -1,8 +1,8 @@
|
||||
# ---- Build Stage ----
|
||||
FROM node:18.15.0-alpine AS builder
|
||||
FROM node:18.15.0-alpine
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
WORKDIR /app
|
||||
# Set the working directory in the container to /console
|
||||
WORKDIR /console
|
||||
|
||||
# Create the pnpm directory and set the PNPM_HOME environment variable
|
||||
RUN mkdir -p ~/.pnpm
|
||||
@@ -14,7 +14,7 @@ ARG ENVIRONMENT=production
|
||||
# Add the pnpm global bin to the PATH
|
||||
ENV PATH /root/.pnpm/bin:$PATH
|
||||
|
||||
# Copy pnpm-lock.yaml (or package.json) into the directory /app in the container
|
||||
# Copy pnpm-lock.yaml (or package.json) into the directory /console in the container
|
||||
COPY console/package.json console/pnpm-lock.yaml ./
|
||||
|
||||
# Copy over .npmrc if applicable
|
||||
@@ -32,23 +32,26 @@ RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
# Install app dependencies
|
||||
RUN pnpm install
|
||||
|
||||
# Copy the console directory contents into the container at /app
|
||||
# Copy the console directory contents into the container at /console
|
||||
COPY console .
|
||||
|
||||
# Build the application
|
||||
RUN pnpm build --environment $ENVIRONMENT
|
||||
|
||||
# ---- Serve Stage ----
|
||||
FROM nginx:alpine
|
||||
# # Make sure the build output is available in /console/dist
|
||||
# RUN ls -la /console/dist
|
||||
|
||||
# Copy the built app to our served directory
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# # ---- Serve Stage ----
|
||||
# FROM nginx:alpine
|
||||
|
||||
# Expose the port nginx is bound to
|
||||
EXPOSE 4200
|
||||
# # Copy the built app to our served directory
|
||||
# COPY --from=builder /console/dist /usr/share/nginx/html
|
||||
|
||||
# Use custom nginx.conf
|
||||
COPY console/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# # Expose the port nginx is bound to
|
||||
# EXPOSE 4201
|
||||
|
||||
# Start Nginx server
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# # Use custom nginx.conf
|
||||
# COPY console/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# # Start Nginx server
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -1 +0,0 @@
|
||||
{{yield}}
|
||||
@@ -1,191 +0,0 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { isArray } from '@ember/array';
|
||||
import { getOwner } from '@ember/application';
|
||||
import { later } from '@ember/runloop';
|
||||
import { task, timeout } from 'ember-concurrency';
|
||||
import { injectAsset } from '../utils/asset-injector';
|
||||
import getMountedEngineRoutePrefix from '@fleetbase/ember-core/utils/get-mounted-engine-route-prefix';
|
||||
|
||||
function removeTrailingDot (str) {
|
||||
if (str.endsWith('.')) {
|
||||
return str.slice(0, -1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
window.exports = window.exports ?? {};
|
||||
export default class ExtensionInjectorComponent extends Component {
|
||||
@service fetch;
|
||||
@service notifications;
|
||||
@service universe;
|
||||
@tracked engines = [];
|
||||
@tracked packages = [];
|
||||
|
||||
constructor () {
|
||||
super(...arguments);
|
||||
this.loadInstalledEngines.perform();
|
||||
}
|
||||
|
||||
@task *loadInstalledEngines () {
|
||||
yield timeout(300);
|
||||
|
||||
try {
|
||||
const engines = yield this.fetch.get('load-installed-engines', {}, { namespace: '~registry/v1' });
|
||||
for (const id in engines) {
|
||||
yield this.loadAndMountEngine.perform(id, engines[id]);
|
||||
}
|
||||
} catch (error) {
|
||||
this.notifications.serverError(error);
|
||||
}
|
||||
}
|
||||
|
||||
@task *loadAndMountEngine (id, enginePackage) {
|
||||
const engineName = enginePackage.name;
|
||||
const assets = yield this.fetch.get(`load-engine-manifest/${id}`, {}, { namespace: '~registry/v1' });
|
||||
|
||||
if (isArray(assets)) {
|
||||
for (const i in assets) {
|
||||
injectAsset(assets[i]);
|
||||
}
|
||||
}
|
||||
|
||||
yield timeout(300);
|
||||
this.registerEngine(enginePackage);
|
||||
}
|
||||
|
||||
registerEngine (enginePackage) {
|
||||
const engineName = enginePackage.name;
|
||||
const owner = getOwner(this);
|
||||
const router = getOwner(this).lookup('router:main');
|
||||
|
||||
if (this.hasAssetManifest(engineName)) {
|
||||
return this.universe.loadEngine(engineName).then(engineInstance => {
|
||||
if (engineInstance.base && engineInstance.base.setupExtension) {
|
||||
engineInstance.base.setupExtension(owner, engineInstance, this.universe);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
if (router._engineIsLoaded(engineName)) {
|
||||
router._registerEngine(engineName);
|
||||
|
||||
const instanceId = Object.values(router._engineInstances).length;
|
||||
const mountPoint = removeTrailingDot(getMountedEngineRoutePrefix(engineName.replace('@fleetbase/', ''), enginePackage.fleetbase));
|
||||
this.universe.constructEngineInstance(engineName, instanceId, mountPoint).then(engineInstance => {
|
||||
if (engineInstance) {
|
||||
this.setupEngine(owner, engineInstance, enginePackage);
|
||||
this.setEnginePromise(engineName, engineInstance);
|
||||
this.addEngineRoutesToRouter(engineName, engineInstance, instanceId, mountPoint, router);
|
||||
this.addEngineRoutesToRecognizer(engineName, router);
|
||||
this.resolveEngineRegistrations(engineInstance);
|
||||
|
||||
console.log(engineInstance, router, owner);
|
||||
if (engineInstance.base && engineInstance.base.setupExtension) {
|
||||
engineInstance.base.setupExtension(owner, engineInstance, this.universe);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.trace(error);
|
||||
}
|
||||
}
|
||||
|
||||
setupEngine (appInstance, engineInstance, enginePackage) {
|
||||
const engineName = enginePackage.name;
|
||||
appInstance.application.engines[engineName] = engineInstance.dependencies ?? { externalRoutes: {}, services: {} };
|
||||
appInstance._dependenciesForChildEngines[engineName] = engineInstance.dependencies ?? { externalRoutes: {}, services: {} };
|
||||
if (isArray(appInstance.application.extensions)) {
|
||||
appInstance.application.extensions.push(enginePackage);
|
||||
}
|
||||
}
|
||||
|
||||
addEngineRoutesToRecognizer (engineName, router) {
|
||||
const recognizer = router._routerMicrolib.recognizer || router._router._routerMicrolib.recognizer;
|
||||
if (recognizer) {
|
||||
let routeName = `${engineName}.application`;
|
||||
|
||||
recognizer.add(
|
||||
[
|
||||
{
|
||||
path: 'console.fleet-ops',
|
||||
handler: 'console.fleet-ops',
|
||||
},
|
||||
],
|
||||
{ as: 'console.fleet-ops' }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
addEngineRoutesToRouter (engineName, engineInstance, instanceId, mountPoint, router) {
|
||||
const getRouteInfo = routeName => {
|
||||
const applicationRoute = routeName.replace(mountPoint, '') === '';
|
||||
return {
|
||||
fullName: mountPoint,
|
||||
instanceId,
|
||||
localFullName: applicationRoute ? 'application' : routeName.replace(`${mountPoint}.`, ''),
|
||||
mountPoint,
|
||||
name: engineName,
|
||||
};
|
||||
};
|
||||
|
||||
const routes = ['console.fleet-ops', 'console.fleet-ops.home'];
|
||||
for (let i = 0; i < routes.length; i++) {
|
||||
const routeName = routes[i];
|
||||
router._engineInfoByRoute[routeName] = getRouteInfo(routeName);
|
||||
}
|
||||
|
||||
// Reinitialize or refresh the router
|
||||
router.setupRouter();
|
||||
}
|
||||
|
||||
setEnginePromise (engineName, engineInstance) {
|
||||
const router = getOwner(this).lookup('router:main');
|
||||
if (router) {
|
||||
router._enginePromises[engineName] = { manual: engineInstance._bootPromise };
|
||||
}
|
||||
}
|
||||
|
||||
resolveEngineRegistrations (engineInstance) {
|
||||
const owner = getOwner(this);
|
||||
const registry = engineInstance.__registry__;
|
||||
const registrations = registry.registrations;
|
||||
const getOwnerSymbol = obj => {
|
||||
const symbols = Object.getOwnPropertySymbols(obj);
|
||||
const ownerSymbol = symbols.find(symbol => symbol.toString() === 'Symbol(OWNER)');
|
||||
return ownerSymbol;
|
||||
};
|
||||
for (let registrationKey in registrations) {
|
||||
const registrationInstance = registrations[registrationKey];
|
||||
if (typeof registrationInstance === 'string') {
|
||||
// Try to resolve from owner
|
||||
let resolvedRegistrationInstance = owner.lookup(registrationKey);
|
||||
// Hack for host-router
|
||||
if (registrationKey === 'service:host-router') {
|
||||
resolvedRegistrationInstance = owner.lookup('service:router');
|
||||
}
|
||||
if (resolvedRegistrationInstance) {
|
||||
// Correct the owner
|
||||
resolvedRegistrationInstance[getOwnerSymbol(resolvedRegistrationInstance)] = engineInstance;
|
||||
// Resolve
|
||||
registrations[registrationKey] = resolvedRegistrationInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hasAssetManifest (engineName) {
|
||||
const router = getOwner(this).lookup('router:main');
|
||||
if (router._assetLoader) {
|
||||
const manifest = router._assetLoader.getManifest();
|
||||
if (manifest && manifest.bundles) {
|
||||
return manifest.bundles[engineName] !== undefined;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{{#if this.ready}}
|
||||
{{mount "@fleetbase/fleetops-engine"}}
|
||||
{{/if}}
|
||||
@@ -1,46 +0,0 @@
|
||||
export function injectAsset ({ type, content, name, syntax }) {
|
||||
switch (type) {
|
||||
case 'css':
|
||||
injectStylesheet(content, syntax);
|
||||
break;
|
||||
case 'meta':
|
||||
injectMeta(name, content);
|
||||
break;
|
||||
case 'js':
|
||||
default:
|
||||
injectScript(content, syntax);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
export function injectMeta (name, content) {
|
||||
const meta = document.createElement('meta');
|
||||
meta.name = name;
|
||||
meta.content = content;
|
||||
document.head.appendChild(meta);
|
||||
}
|
||||
|
||||
export function injectScript (content, type = 'application/javascript') {
|
||||
const script = document.createElement('script');
|
||||
script.type = type;
|
||||
script.text = content;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
export function injectStylesheet (content, type = 'text/css') {
|
||||
const style = document.createElement('style');
|
||||
style.type = type;
|
||||
if (style.styleSheet) {
|
||||
style.styleSheet.cssText = content;
|
||||
} else {
|
||||
style.appendChild(document.createTextNode(content));
|
||||
}
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
|
||||
export default {
|
||||
injectAsset,
|
||||
injectMeta,
|
||||
injectScript,
|
||||
injectStylesheet,
|
||||
};
|
||||
@@ -2,6 +2,7 @@
|
||||
const toBoolean = require('./utils/to-boolean');
|
||||
const getenv = require('./utils/getenv');
|
||||
const fixApiHost = require('./utils/fix-api-host');
|
||||
const asArray = require('./utils/as-array');
|
||||
const { version } = require('../package');
|
||||
|
||||
module.exports = function (environment) {
|
||||
@@ -20,7 +21,7 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
APP: {
|
||||
showExtensionsLink: toBoolean(getenv('SHOW_EXTENSIONS_LINK', true)),
|
||||
extensions: asArray(getenv('EXTENSIONS')),
|
||||
},
|
||||
|
||||
API: {
|
||||
@@ -29,8 +30,8 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
osrm: {
|
||||
host: getenv('OSRM_HOST', 'https://bundle.routing.fleetbase.io'),
|
||||
servers: getenv('OSRM_SERVERS', '').split(',').filter(Boolean),
|
||||
host: getenv('OSRM_HOST', 'https://router.project-osrm.org'),
|
||||
servers: {},
|
||||
},
|
||||
|
||||
socket: {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module.exports = function () {
|
||||
return {
|
||||
'free-solid-svg-icons': 'all',
|
||||
'free-brands-svg-icons': 'all',
|
||||
};
|
||||
};
|
||||
|
||||
11
console/config/utils/as-array.js
Normal file
11
console/config/utils/as-array.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = function asArray(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (typeof value === 'string' && value.includes(',')) {
|
||||
return value.split(',');
|
||||
}
|
||||
|
||||
return [];
|
||||
};
|
||||
@@ -4,5 +4,4 @@ SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=localhost
|
||||
SOCKETCLUSTER_SECURE=false
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://bundle.routing.fleetbase.io
|
||||
OSRM_SERVERS=https://canada.routing.fleetbase.io,https://us.routing.fleetbase.io
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
@@ -5,5 +5,4 @@ SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://bundle.routing.fleetbase.io
|
||||
OSRM_SERVERS=https://canada.routing.fleetbase.io,https://us.routing.fleetbase.io
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fleetbase/console",
|
||||
"version": "0.4.27",
|
||||
"version": "0.5.3",
|
||||
"private": true,
|
||||
"description": "Modular logistics and supply chain operating system (LSOS)",
|
||||
"repository": "https://github.com/fleetbase/fleetbase",
|
||||
@@ -29,16 +29,17 @@
|
||||
"test:ember": "ember test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fleetbase/ember-core": "^0.2.12",
|
||||
"@fleetbase/ember-ui": "^0.2.18",
|
||||
"@fleetbase/fleetops-engine": "^0.5.3",
|
||||
"@fleetbase/storefront-engine": "^0.3.12",
|
||||
"@fleetbase/dev-engine": "^0.2.4",
|
||||
"@fleetbase/iam-engine": "^0.0.13",
|
||||
"@fleetbase/ember-core": "^0.2.14",
|
||||
"@fleetbase/ember-ui": "^0.2.20",
|
||||
"@fleetbase/fleetops-engine": "^0.5.5",
|
||||
"@fleetbase/storefront-engine": "^0.3.13",
|
||||
"@fleetbase/dev-engine": "^0.2.5",
|
||||
"@fleetbase/iam-engine": "^0.0.14",
|
||||
"@fleetbase/registry-bridge-engine": "^0.0.11",
|
||||
"@fleetbase/fleetops-data": "^0.1.17",
|
||||
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
||||
"@ember/legacy-built-in-components": "^0.4.1",
|
||||
"@fortawesome/ember-fontawesome": "^0.4.1",
|
||||
"@fortawesome/ember-fontawesome": "^2.0.0",
|
||||
"ember-changeset": "^4.1.2",
|
||||
"ember-changeset-validations": "^4.1.1",
|
||||
"ember-composable-helpers": "^5.0.0",
|
||||
@@ -47,7 +48,7 @@
|
||||
"ember-gridstack": "^4.0.0",
|
||||
"ember-intl": "6.3.2",
|
||||
"ember-math-helpers": "^2.18.2",
|
||||
"ember-power-select": "^6.0.1",
|
||||
"ember-power-select": "^7.2.0",
|
||||
"ember-prism": "^0.13.0",
|
||||
"ember-radio-button": "3.0.0-beta.1",
|
||||
"ember-tag-input": "^3.1.0",
|
||||
@@ -66,9 +67,9 @@
|
||||
"@ember/optional-features": "^2.0.0",
|
||||
"@ember/string": "^3.1.1",
|
||||
"@ember/test-helpers": "^3.2.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
||||
"@fortawesome/fontawesome-svg-core": "6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "6.4.0",
|
||||
"@fortawesome/free-solid-svg-icons": "6.4.0",
|
||||
"@glimmer/component": "^1.1.2",
|
||||
"@glimmer/tracking": "^1.1.2",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
@@ -142,8 +143,8 @@
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"@fleetbase/ember-core": "^0.2.12",
|
||||
"@fleetbase/ember-ui": "^0.2.18",
|
||||
"@fleetbase/ember-core": "^0.2.14",
|
||||
"@fleetbase/ember-ui": "^0.2.20",
|
||||
"@fleetbase/fleetops-data": "^0.1.17"
|
||||
}
|
||||
},
|
||||
|
||||
25384
console/pnpm-lock.yaml
generated
25384
console/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from '@fleetbase/console/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | extension-injector', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<ExtensionInjector />`);
|
||||
|
||||
assert.dom().hasText('');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<ExtensionInjector>
|
||||
template block text
|
||||
</ExtensionInjector>
|
||||
`);
|
||||
|
||||
assert.dom().hasText('template block text');
|
||||
});
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
import assetInjector from '@fleetbase/console/utils/asset-injector';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Utility | asset-injector', function () {
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', function (assert) {
|
||||
let result = assetInjector();
|
||||
assert.ok(result);
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
cache:
|
||||
image: redis:4-alpine
|
||||
@@ -38,9 +36,18 @@ services:
|
||||
CACHE_URL: tcp://cache
|
||||
REDIS_URL: tcp://cache
|
||||
|
||||
application:
|
||||
console:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: console/Dockerfile.server-build
|
||||
args:
|
||||
ENVIRONMENT: development
|
||||
ports:
|
||||
- "4201:4201"
|
||||
- "4200:4200"
|
||||
volumes:
|
||||
- console-build:/console
|
||||
|
||||
application:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
@@ -48,7 +55,10 @@ services:
|
||||
args:
|
||||
ENVIRONMENT: development
|
||||
GITHUB_AUTH_KEY: ${GITHUB_AUTH_KEY}
|
||||
volumes:
|
||||
- console-build:/fleetbase/console
|
||||
environment:
|
||||
ENVIRONMENT: development
|
||||
DATABASE_URL: "mysql://root@database/fleetbase"
|
||||
QUEUE_CONNECTION: redis
|
||||
CACHE_DRIVER: redis
|
||||
@@ -63,6 +73,9 @@ services:
|
||||
MODEL_CACHE_ENABLED: 'true'
|
||||
RESPONSE_CACHE_ENABLED: 'true'
|
||||
RESPONSE_CACHE_DRIVER: redis
|
||||
REGISTRY_HOST: https://registry.fleetbase.io
|
||||
REGISTRY_PREINSTALLED_EXTENSIONS: 'true'
|
||||
OSRM_HOST: https://router.project-osrm.org
|
||||
depends_on:
|
||||
- database
|
||||
- cache
|
||||
@@ -76,3 +89,6 @@ services:
|
||||
- "8000:80"
|
||||
depends_on:
|
||||
- application
|
||||
|
||||
volumes:
|
||||
console-build:
|
||||
@@ -1,6 +1,6 @@
|
||||
# syntax = docker/dockerfile:1.2
|
||||
# Base stage
|
||||
FROM dunglas/frankenphp:1.1.0-php8.2-bookworm as base
|
||||
FROM dunglas/frankenphp:1.2.2-php8.2-bookworm as base
|
||||
|
||||
# Install packages
|
||||
RUN apt-get update && apt-get install -y git bind9-utils mycli nodejs npm nano \
|
||||
@@ -31,17 +31,17 @@ RUN sed -e 's/^expose_php.*/expose_php = Off/' "$PHP_INI_DIR/php.ini-production"
|
||||
-e 's/^memory_limit.*/memory_limit = 600M/' "$PHP_INI_DIR/php.ini"
|
||||
|
||||
# Install global node modules
|
||||
RUN npm install -g chokidar pnpm ember-cli
|
||||
RUN npm install -g chokidar pnpm ember-cli npm-cli-login
|
||||
|
||||
# Install ssm-parent
|
||||
COPY --from=ghcr.io/springload/ssm-parent:1.8 /usr/bin/ssm-parent /sbin/ssm-parent
|
||||
|
||||
# # Create the pnpm directory and set the PNPM_HOME environment variable
|
||||
# RUN mkdir -p ~/.pnpm
|
||||
# ENV PNPM_HOME /root/.pnpm
|
||||
# Create the pnpm directory and set the PNPM_HOME environment variable
|
||||
RUN mkdir -p ~/.pnpm
|
||||
ENV PNPM_HOME /root/.pnpm
|
||||
|
||||
# # Add the pnpm global bin to the PATH
|
||||
# ENV PATH /root/.pnpm/bin:$PATH
|
||||
# Add the pnpm global bin to the PATH
|
||||
ENV PATH /root/.pnpm/bin:$PATH
|
||||
|
||||
# Set some build ENV variables
|
||||
ENV LOG_CHANNEL=stdout
|
||||
@@ -63,33 +63,7 @@ ARG GITHUB_AUTH_KEY
|
||||
COPY --chown=www-data:www-data ./Caddyfile $CADDYFILE_PATH
|
||||
|
||||
# Create /fleetbase directory and set correct permissions
|
||||
RUN mkdir -p /fleetbase/api && chown -R www-data:www-data /fleetbase
|
||||
|
||||
## -- Start Console Setup --
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /fleetbase/console
|
||||
|
||||
# TEMPORARILY ADD REGISTRY BRIDGE AND CORE API
|
||||
COPY ./packages/registry-bridge /fleetbase/packages/registry-bridge
|
||||
COPY ./packages/core-api /fleetbase/packages/core-api
|
||||
|
||||
# Copy pnpm-lock.yaml (or package.json) into the directory /app in the container
|
||||
COPY ./console/package.json ./console/pnpm-lock.yaml /fleetbase/console/
|
||||
|
||||
# Copy over .npmrc if applicable
|
||||
COPY ./console/.npmr[c] /fleetbase/console/
|
||||
|
||||
# Install app dependencies
|
||||
# RUN pnpm install
|
||||
|
||||
# Copy the console directory contents into the container at /app
|
||||
COPY ./console /fleetbase/console/
|
||||
|
||||
# Build the application
|
||||
# RUN pnpm build --environment $ENVIRONMENT
|
||||
|
||||
## -- End Console Setup --
|
||||
RUN mkdir -p /fleetbase/api && mkdir -p /fleetbase/console && chown -R www-data:www-data /fleetbase
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /fleetbase/api
|
||||
@@ -156,9 +130,9 @@ CMD ["php", "artisan", "queue:work"]
|
||||
FROM base as app-dev
|
||||
ENTRYPOINT ["docker-php-entrypoint"]
|
||||
# Add --watch flag later
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --port=8000 --host=0.0.0.0 --caddyfile $CADDYFILE_PATH"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --workers=6 --max-requests=250 --port=8000 --host=0.0.0.0 --caddyfile $CADDYFILE_PATH"]
|
||||
|
||||
# Application stage
|
||||
FROM base as app
|
||||
ENTRYPOINT ["/sbin/ssm-parent", "-c", ".ssm-parent.yaml", "run", "--", "docker-php-entrypoint"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --port=8000 --host=0.0.0.0 --https --http-redirect --caddyfile $CADDYFILE_PATH"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --workers=6 --max-requests=250 --port=8000 --host=0.0.0.0 --https --http-redirect --caddyfile $CADDYFILE_PATH"]
|
||||
|
||||
Submodule packages/core-api updated: fb2e615b50...f6a1345600
Submodule packages/dev-engine updated: 206bdb5406...c7136ce4c6
Submodule packages/ember-core updated: db536b414c...1ed4989719
Submodule packages/ember-ui updated: fa277fd1b3...255c35e57b
Submodule packages/fleetops updated: 8b52c1fc07...65f667d557
Submodule packages/iam-engine updated: 4e25379a1b...7d0a1ff025
1
packages/ledger
Submodule
1
packages/ledger
Submodule
Submodule packages/ledger added at 1f6f27f501
Submodule packages/pallet updated: 9d87fc26fe...424446db0e
1
packages/registry-bridge
Submodule
1
packages/registry-bridge
Submodule
Submodule packages/registry-bridge added at 118af7657a
Submodule packages/storefront updated: 845eba683c...f148c4fee0
Reference in New Issue
Block a user