From 72ddf401c31078c9124e52a56221e607291b8375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=84=E5=BB=BA=E5=9B=BD?= <9340100@qq.com> Date: Thu, 12 Oct 2023 02:46:00 +0000 Subject: [PATCH] =?UTF-8?q?docker=20=E5=8D=87=E7=BA=A7=202.5.15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- steedos-community/2.5/Dockerfile | 17 --------------- steedos-community/2.5/build.sh | 18 ---------------- steedos-community/2.5/package.json | 11 ---------- steedos-community/2.5/steedos.config.js | 13 ------------ steedos-community/2.6/Dockerfile | 17 --------------- steedos-community/2.6/build.sh | 18 ---------------- steedos-community/2.6/package.json | 11 ---------- steedos-community/2.6/steedos.config.js | 13 ------------ steedos-community/docker-compose.yml | 16 +++++--------- steedos-enterprise/2.5/Dockerfile | 17 --------------- steedos-enterprise/2.5/build.sh | 18 ---------------- steedos-enterprise/2.5/package.json | 12 ----------- steedos-enterprise/2.5/steedos.config.js | 14 ------------- steedos-enterprise/docker-compose-cluster.yml | 1 - steedos-enterprise/docker-compose.yml | 21 +++++-------------- 16 files changed, 13 insertions(+), 208 deletions(-) delete mode 100644 steedos-community/2.5/Dockerfile delete mode 100644 steedos-community/2.5/build.sh delete mode 100644 steedos-community/2.5/package.json delete mode 100644 steedos-community/2.5/steedos.config.js delete mode 100644 steedos-community/2.6/Dockerfile delete mode 100644 steedos-community/2.6/build.sh delete mode 100644 steedos-community/2.6/package.json delete mode 100644 steedos-community/2.6/steedos.config.js delete mode 100644 steedos-enterprise/2.5/Dockerfile delete mode 100644 steedos-enterprise/2.5/build.sh delete mode 100644 steedos-enterprise/2.5/package.json delete mode 100644 steedos-enterprise/2.5/steedos.config.js diff --git a/.gitignore b/.gitignore index 845959d..e501e28 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -**/.env \ No newline at end of file +**/.env + +steedos-storage \ No newline at end of file diff --git a/steedos-community/2.5/Dockerfile b/steedos-community/2.5/Dockerfile deleted file mode 100644 index 05bea61..0000000 --- a/steedos-community/2.5/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM node:14-slim - -RUN apt-get update || : && apt-get install -y \ - python \ - curl \ - build-essential - -WORKDIR /app - -ADD package.json . -ADD steedos.config.js . - -ENV NODE_ENV=production - -RUN yarn --production && yarn cache clean - -CMD ["yarn", "start"] diff --git a/steedos-community/2.5/build.sh b/steedos-community/2.5/build.sh deleted file mode 100644 index 76ba912..0000000 --- a/steedos-community/2.5/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -export STEEDOS_VERSION=2.5 - -echo "#########################################################################" -echo "steedos community version: ${STEEDOS_VERSION}" -echo "#########################################################################" - -docker build --rm --no-cache \ - --build-arg ARCH=amd64 \ - --build-arg NODE_VERSION=14 \ - --build-arg STEEDOS_VERSION=${STEEDOS_VERSION} \ - --build-arg OS=alpine3.12 \ - --build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")" \ - --build-arg TAG_SUFFIX=default \ - --file Dockerfile \ - --tag steedos/steedos-community . - -docker tag steedos/steedos-community steedos/steedos-community:${STEEDOS_VERSION} \ No newline at end of file diff --git a/steedos-community/2.5/package.json b/steedos-community/2.5/package.json deleted file mode 100644 index da763c1..0000000 --- a/steedos-community/2.5/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "project-template", - "version": "~2.5", - "private": true, - "scripts": { - "start": "steedos start" - }, - "dependencies": { - "@steedos/service-community": "~2.5" - } -} \ No newline at end of file diff --git a/steedos-community/2.5/steedos.config.js b/steedos-community/2.5/steedos.config.js deleted file mode 100644 index ea24231..0000000 --- a/steedos-community/2.5/steedos.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - // Namespace of nodes to segment your nodes on the same network. - namespace: "steedos", - // Default log level for built-in console logger. It can be overwritten in logger options above. - // Available values: trace, debug, info, warn, error, fatal - logLevel: "warn", - - // Called after broker started. - started(broker) { - broker.createService(require("@steedos/service-community")); - }, - -}; \ No newline at end of file diff --git a/steedos-community/2.6/Dockerfile b/steedos-community/2.6/Dockerfile deleted file mode 100644 index 05bea61..0000000 --- a/steedos-community/2.6/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM node:14-slim - -RUN apt-get update || : && apt-get install -y \ - python \ - curl \ - build-essential - -WORKDIR /app - -ADD package.json . -ADD steedos.config.js . - -ENV NODE_ENV=production - -RUN yarn --production && yarn cache clean - -CMD ["yarn", "start"] diff --git a/steedos-community/2.6/build.sh b/steedos-community/2.6/build.sh deleted file mode 100644 index 594116e..0000000 --- a/steedos-community/2.6/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -export STEEDOS_VERSION=2.6 - -echo "#########################################################################" -echo "steedos community version: ${STEEDOS_VERSION}" -echo "#########################################################################" - -docker build --rm --no-cache \ - --build-arg ARCH=amd64 \ - --build-arg NODE_VERSION=14 \ - --build-arg STEEDOS_VERSION=${STEEDOS_VERSION} \ - --build-arg OS=alpine3.12 \ - --build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")" \ - --build-arg TAG_SUFFIX=default \ - --file Dockerfile \ - --tag steedos/steedos-community . - -docker tag steedos/steedos-community steedos/steedos-community:${STEEDOS_VERSION} \ No newline at end of file diff --git a/steedos-community/2.6/package.json b/steedos-community/2.6/package.json deleted file mode 100644 index 02b58a7..0000000 --- a/steedos-community/2.6/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "project-template", - "version": "~2.6", - "private": true, - "scripts": { - "start": "steedos start" - }, - "dependencies": { - "@steedos/service-community": "~2.6" - } -} \ No newline at end of file diff --git a/steedos-community/2.6/steedos.config.js b/steedos-community/2.6/steedos.config.js deleted file mode 100644 index ea24231..0000000 --- a/steedos-community/2.6/steedos.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - // Namespace of nodes to segment your nodes on the same network. - namespace: "steedos", - // Default log level for built-in console logger. It can be overwritten in logger options above. - // Available values: trace, debug, info, warn, error, fatal - logLevel: "warn", - - // Called after broker started. - started(broker) { - broker.createService(require("@steedos/service-community")); - }, - -}; \ No newline at end of file diff --git a/steedos-community/docker-compose.yml b/steedos-community/docker-compose.yml index abce2a1..495a888 100644 --- a/steedos-community/docker-compose.yml +++ b/steedos-community/docker-compose.yml @@ -11,12 +11,13 @@ services: - PORT=3000 - MONGO_URL=mongodb://mongodb:27017/steedos - MONGO_OPLOG_URL=mongodb://mongodb:27017/local - - TRANSPORTER=nats://nats:4222 - - CACHER=redis://redis:6379 - - STEEDOS_INITIAL_PACKAGES=@steedos-labs/project-ee,@steedos-labs/demo-ee,@steedos-labs/flows + - TRANSPORTER=redis://redis:6379 + - CACHER=redis://redis:6379/1 + - STEEDOS_INITIAL_PACKAGES=@steedos-labs/contract-ce + - STEEDOS_STORAGE_DIR=/steedos-storage volumes: - "steedos-installed-packages:/app/.steedos" - - "steedos-data:/app/storage" + - "steedos-data:/steedos-storage" labels: - "com.centurylinklabs.watchtower.enable=true" healthcheck: @@ -59,13 +60,6 @@ services: 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" - # - "8222:8222" # monitor port - # watchtower: # restart: always diff --git a/steedos-enterprise/2.5/Dockerfile b/steedos-enterprise/2.5/Dockerfile deleted file mode 100644 index 05bea61..0000000 --- a/steedos-enterprise/2.5/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM node:14-slim - -RUN apt-get update || : && apt-get install -y \ - python \ - curl \ - build-essential - -WORKDIR /app - -ADD package.json . -ADD steedos.config.js . - -ENV NODE_ENV=production - -RUN yarn --production && yarn cache clean - -CMD ["yarn", "start"] diff --git a/steedos-enterprise/2.5/build.sh b/steedos-enterprise/2.5/build.sh deleted file mode 100644 index ca8c15b..0000000 --- a/steedos-enterprise/2.5/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -export STEEDOS_VERSION=2.5 - -echo "#########################################################################" -echo "steedos enterprise version: ${STEEDOS_VERSION}" -echo "#########################################################################" - -docker build --rm --no-cache \ - --build-arg ARCH=amd64 \ - --build-arg NODE_VERSION=14 \ - --build-arg STEEDOS_VERSION=${STEEDOS_VERSION} \ - --build-arg OS=alpine3.12 \ - --build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")" \ - --build-arg TAG_SUFFIX=default \ - --file Dockerfile \ - --tag steedos/steedos-enterprise . - -docker tag steedos/steedos-enterprise steedos/steedos-enterprise:${STEEDOS_VERSION} \ No newline at end of file diff --git a/steedos-enterprise/2.5/package.json b/steedos-enterprise/2.5/package.json deleted file mode 100644 index 4c74c9c..0000000 --- a/steedos-enterprise/2.5/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "project-ee", - "version": "~2.5", - "private": true, - "scripts": { - "start": "steedos start" - }, - "dependencies": { - "@steedos/service-community": "~2.5", - "@steedos/service-enterprise": "^2.5.3" - } -} diff --git a/steedos-enterprise/2.5/steedos.config.js b/steedos-enterprise/2.5/steedos.config.js deleted file mode 100644 index 9ebd12e..0000000 --- a/steedos-enterprise/2.5/steedos.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - // Namespace of nodes to segment your nodes on the same network. - namespace: "steedos", - // Default log level for built-in console logger. It can be overwritten in logger options above. - // Available values: trace, debug, info, warn, error, fatal - logLevel: "warn", - - // Called after broker started. - started(broker) { - broker.createService(require("@steedos/service-community")); - broker.createService(require("@steedos/service-enterprise")); - }, - -}; diff --git a/steedos-enterprise/docker-compose-cluster.yml b/steedos-enterprise/docker-compose-cluster.yml index d028c4e..6851f94 100644 --- a/steedos-enterprise/docker-compose-cluster.yml +++ b/steedos-enterprise/docker-compose-cluster.yml @@ -5,7 +5,6 @@ services: # Steedos Platform steedos: image: steedos/steedos-enterprise:2.5 - command: "yarn start" ports: - "${STEEDOS_PORT}:3000" volumes: diff --git a/steedos-enterprise/docker-compose.yml b/steedos-enterprise/docker-compose.yml index 9889079..ae1384e 100644 --- a/steedos-enterprise/docker-compose.yml +++ b/steedos-enterprise/docker-compose.yml @@ -5,11 +5,11 @@ services: # Steedos Platform steedos: image: steedos/steedos-enterprise:2.5 - command: "yarn start" ports: - "${STEEDOS_PORT:-3000}:3000" volumes: - "steedos-packages:/app/.steedos" + - "steedos-storage:/steedos-storage" environment: - ROOT_URL=${STEEDOS_ROOT_URL:-http://localhost:3000} - MONGO_URL=mongodb://root:${MONGODB_PASSWORD:-steedos}@${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/${MONGODB_DATABASE:-steedos}?authSource=admin @@ -21,8 +21,8 @@ services: - STEEDOS_CFS_AWS_S3_BUCKET=${MINIO_DEFAULT_BUCKETS:-steedos} - STEEDOS_CFS_AWS_S3_ACCESS_KEY_ID=${MINIO_ROOT_USER:-steedos} - STEEDOS_CFS_AWS_S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD:-steedos123} - - TRANSPORTER=nats://${NATS_USERNAME:-steedos}:${NATS_USERNAME:-steedos}@nats:4222 - - CACHER=redis://:${REDIS_PASSWORD:-steedos}@redis:6379 + - TRANSPORTER=redis://:${REDIS_PASSWORD:-steedos}@redis:6379 + - CACHER=redis://:${REDIS_PASSWORD:-steedos}@redis:6379/1 - STEEDOS_IDENTITY_OIDC_ENABLED=true - STEEDOS_IDENTITY_OIDC_CONFIG_URL=https://id.steedos.cn/realms/master/.well-known/openid-configuration - STEEDOS_IDENTITY_OIDC_CLIENT_ID=steedos-oidc-public @@ -41,8 +41,6 @@ services: condition: service_healthy minio: condition: service_started - nats: - condition: service_started labels: - "com.centurylinklabs.watchtower.enable=true" @@ -55,17 +53,6 @@ services: ports: - "6379:6379" - # Micro Service Transporter - nats: - image: steedos/nats:2.8.5 - environment: - - MAX_PAYLOAD=8096000 #8MB - - NATS_USERNAME=${NATS_USERNAME:-steedos} - - NATS_PASSWORD=${NATS_PASSWORD:-steedos} - ports: - - "4222:4222" - - "8222:8222" # monitor port - # S3 Storage Service minio: image: bitnami/minio @@ -145,6 +132,8 @@ services: volumes: steedos-packages: driver: local + steedos-storage: + driver: local steedos-minio-data: driver: local steedos-mongodb-data: