Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
hotlong committed Sep 27, 2023
2 parents aa686de + 971836a commit 7dc498c
Show file tree
Hide file tree
Showing 13 changed files with 441 additions and 56 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release-docker-enterprise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release Docker EE

on:
workflow_run:
workflows: [Release NPM]
types:
- completed

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get branch names
id: branch-name
uses: tj-actions/[email protected]
with:
strip_tag_prefix: v

- name: Get the current tag
if: steps.branch-name.outputs.is_tag == 'true' # Replaces: startsWith(github.ref, 'refs/tags/')
run: |
echo "${{ steps.branch-name.outputs.tag }}"
- uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'

- name: Check is stable
if: ${{ steps.version.outputs.is_stable != 'true' }}
run: exit 0

- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
steedos/steedos-enterprise
tags: |
type=ref,event=branch
type=ref,event=pr
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/login-action@v1
name: Login Docker Hub
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push docker
uses: docker/build-push-action@v3
with:
context: ./deploy/enterprise
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and publish
name: Release NPM

on:
push:
Expand Down
3 changes: 3 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ports:
- port: 5432
onOpen: ignore
visibility: public
- port: 80
onOpen: ignore
visibility: public
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Docker
Expand Down
3 changes: 2 additions & 1 deletion deploy/enterprise/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
stacks
.env
.env
mongo-data
55 changes: 55 additions & 0 deletions deploy/enterprise/docker-compose-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: "3.9"

services:

steedos:
image: steedos/steedos-enterprise:latest
ports:
- "80:80"
- "443:443"
environment:
- MONGO_URL=mongodb://mongodb:27017/steedos
- MONGO_OPLOG_URL=mongodb://mongodb:27017/local
- TRANSPORTER=nats://nats:4222
- CACHER=redis://redis:6379
- ROOT_URL=http://127.0.0.1:3000
volumes:
- "./stacks:/steedos-stacks"
tty: true
depends_on:
mongodb:
condition: service_healthy

redis:
image: redis:6.0
command: "redis-server --save \"\" --appendonly no --loglevel warning"
ports:
- "6379:6379"

mongodb:
image: mongo:4.4
ports:
- 27017:27017
command: "--bind_ip_all --replSet steedos --logpath /var/log/mongodb/mongod.log"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo --quiet | grep 1
interval: 10s
timeout: 10s
retries: 5
volumes:
- './mongo-data:/data/db'

mongodb-init:
image: mongo:4.4
restart: "no"
depends_on:
mongodb:
condition: service_healthy
command: >
mongo --host mongodb:27017 --eval "rs.initiate({ _id: 'steedos', members: [{_id: 0, host: 'mongodb:27017'}]})"
# Micro Service Transporter
nats:
image: nats:2.9
ports:
- "4222:4222"
8 changes: 3 additions & 5 deletions deploy/enterprise/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ services:
dockerfile: ./Dockerfile
image: steedos/steedos-enterprise:latest
ports:
- "80:80" # Nginx
- "443:443" # Nginx SSL
- "3000:3000" # Steedos Platform
- "3100:3100" # Unpkg
- "9001:9001" # Supervisor
- "80:80"
- "443:443"
environment:
- ROOT_URL=http://127.0.0.1:3000
tty: true
volumes:
- "./stacks:/steedos-stacks"

20 changes: 10 additions & 10 deletions deploy/enterprise/fs/opt/steedos/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ init_replica_set() {
if [[ $isUriLocal -gt 0 ]]; then
echo "Checking Replica Set of external MongoDB"

if appsmithctl check-replica-set; then
echo "MongoDB ReplicaSet is enabled"
else
echo -e "\033[0;31m***************************************************************************************\033[0m"
echo -e "\033[0;31m* MongoDB Replica Set is not enabled *\033[0m"
echo -e "\033[0;31m* Please ensure the credentials provided for MongoDB, has 'readWrite' role. *\033[0m"
echo -e "\033[0;31m***************************************************************************************\033[0m"
exit 1
fi
# if appsmithctl check-replica-set; then
# echo "MongoDB ReplicaSet is enabled"
# else
# echo -e "\033[0;31m***************************************************************************************\033[0m"
# echo -e "\033[0;31m* MongoDB Replica Set is not enabled *\033[0m"
# echo -e "\033[0;31m* Please ensure the credentials provided for MongoDB, has 'readWrite' role. *\033[0m"
# echo -e "\033[0;31m***************************************************************************************\033[0m"
# exit 1
# fi
fi
}

Expand Down Expand Up @@ -178,7 +178,7 @@ configure_supervisord() {

init_env_file


check_mongodb_uri
if [[ -z "${DYNO}" ]]; then
# Don't run MongoDB if running in a Heroku dyno.
init_mongodb
Expand Down
76 changes: 38 additions & 38 deletions services/service-metadata-apps/src/actionsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,54 +328,54 @@ async function transformAppToMenus(ctx, app, mobile, userSession, context) {
}
if(app.enable_nav_schema && app.nav_schema && !mobile){
menu.nav_schema = _.isString(app.nav_schema) ? JSON.parse(app.nav_schema) : app.nav_schema
}else{
const hiddenTabNames = context.hiddenTabNames || []
if (app.tab_items) {
// app.tab_items is array
if (_.isArray(app.tab_items)) {
for (const item of app.tab_items) {
try {
if (hiddenTabNames.includes(item.tab_name)) continue;
await tabMenus(ctx, appPath, item.tab_name, menu, mobile, userSession, context, item)
} catch (error) {
ctx.broker.logger.info(error.message);
}
}
} else {
for (const tabApiName in app.tab_items) {
try {
if (hiddenTabNames.includes(tabApiName)) continue;
const props = app.tab_items[tabApiName]
await tabMenus(ctx, appPath, tabApiName, menu, mobile, userSession, context, props)
} catch (error) {
ctx.broker.logger.info(error.message);
}
}

const hiddenTabNames = context.hiddenTabNames || []
if (app.tab_items) {
// app.tab_items is array
if (_.isArray(app.tab_items)) {
for (const item of app.tab_items) {
try {
if (hiddenTabNames.includes(item.tab_name)) continue;
await tabMenus(ctx, appPath, item.tab_name, menu, mobile, userSession, context, item)
} catch (error) {
ctx.broker.logger.info(error.message);
}
}
} else if (_.isArray(app.tabs)) {
for (const tabApiName of app.tabs) {
} else {
for (const tabApiName in app.tab_items) {
try {
if (hiddenTabNames.includes(tabApiName)) continue;
await tabMenus(ctx, appPath, tabApiName, menu, mobile, userSession, context)
const props = app.tab_items[tabApiName]
await tabMenus(ctx, appPath, tabApiName, menu, mobile, userSession, context, props)
} catch (error) {
ctx.broker.logger.info(error.message);
}
}
}
const objects = mobile ? app.mobile_objects : app.objects
// const objectsConfigs = context.objects;
if (_.isArray(objects)) {
const getChildrenPromises = []
for (const objectApiName of objects) {
getChildrenPromises.push(getMenuChildren({
objectApiName, userSession, ctx, appPath, app
}))
} else if (_.isArray(app.tabs)) {
for (const tabApiName of app.tabs) {
try {
if (hiddenTabNames.includes(tabApiName)) continue;
await tabMenus(ctx, appPath, tabApiName, menu, mobile, userSession, context)
} catch (error) {
ctx.broker.logger.info(error.message);
}
const children = await Promise.all(getChildrenPromises)
for (const child of children) {
if (child) {
menu.children.push(child)
}
}
}
const objects = mobile ? app.mobile_objects : app.objects
// const objectsConfigs = context.objects;
if (_.isArray(objects)) {
const getChildrenPromises = []
for (const objectApiName of objects) {
getChildrenPromises.push(getMenuChildren({
objectApiName, userSession, ctx, appPath, app
}))
}
const children = await Promise.all(getChildrenPromises)
for (const child of children) {
if (child) {
menu.children.push(child)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ fields:
listviews:
all:
label: All Packages
custom:
label: Custom Packages
system:
label: System Packages
actions:
disable:
label: Disable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ columns:
- field: status
- field: static
filter_scope: space
label: 已安装
label: 所有软件包
scrolling_mode: standard
shared: true
show_count: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: custom
columns:
- field: label
wrap: false
- field: description
wrap: false
- field: version
wrap: false
- field: status
- field: static
filter_scope: space
label: 自定义软件包
scrolling_mode: standard
shared: true
show_count: false
type: grid
filters: [["static","!=", true]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: system
columns:
- field: label
wrap: false
- field: description
wrap: false
- field: version
wrap: false
- field: status
- field: static
filter_scope: space
label: 系统软件包
scrolling_mode: standard
shared: true
show_count: false
type: grid
filters: [["static","=", true]]
Loading

0 comments on commit 7dc498c

Please sign in to comment.