diff --git a/.vscode/launch.json b/.vscode/launch.json index b80e833e9b..646aab7971 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -181,7 +181,6 @@ "request": "launch", "args": ["src/__start.ts"], "env": { - "ELASTIC_URL": "http://localhost:9200", "MONGO_URL": "mongodb://localhost:27017", "METRICS_CONSOLE": "false", "STORAGE_CONFIG": "minio|localhost?accessKey=minioadmin&secretKey=minioadmin", @@ -264,8 +263,7 @@ "SERVER_SECRET": "secret", "MONGO_URL": "mongodb://localhost:27017", "ACCOUNTS_URL": "http://localhost:3000", - "TELEGRAM_DATABASE": "telegram-service", - "ELASTIC_URL": "http://localhost:9200" + "TELEGRAM_DATABASE": "telegram-service" }, "runtimeArgs": ["--nolazy", "-r", "ts-node/register"], "sourceMaps": true, @@ -290,7 +288,6 @@ "DB_URL": "mongodb://localhost:27017", "ACCOUNTS_URL": "http://localhost:3000", "TELEGRAM_DATABASE": "telegram-service", - "ELASTIC_URL": "http://localhost:9200", "REKONI_URL": "http://localhost:4004", "MODEL_VERSION": "0.6.287" }, @@ -318,7 +315,6 @@ "DB_URL": "postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable", "MONGO_URL": "mongodb://localhost:27017", "TELEGRAM_DATABASE": "telegram-service", - "ELASTIC_URL": "http://localhost:9200", "REKONI_URL": "http://localhost:4004", "MODEL_VERSION": "0.6.287" }, @@ -342,7 +338,6 @@ "DB_URL": "postgresql://postgres:example@localhost:5432", "ACCOUNTS_URL": "http://localhost:3000", "TELEGRAM_DATABASE": "telegram-service", - "ELASTIC_URL": "http://localhost:9200", "REKONI_URL": "http://localhost:4004" }, "runtimeVersion": "20", diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index d92ff909c7..01adc293e9 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -232,7 +232,6 @@ services: - ACCOUNTS_URL=http://host.docker.internal:3000 - STATS_URL=http://host.docker.internal:4900 - UPLOAD_URL=/files - - ELASTIC_URL=http://host.docker.internal:9200 - GMAIL_URL=http://host.docker.internal:8088 - CALENDAR_URL=http://host.docker.internal:8095 - TELEGRAM_URL=http://host.docker.internal:8086 diff --git a/dev/import-tool/package.json b/dev/import-tool/package.json index 336f00f6fd..29af15302d 100644 --- a/dev/import-tool/package.json +++ b/dev/import-tool/package.json @@ -19,8 +19,8 @@ "docker:tbuild": "docker build -t hardcoreeng/import-tool . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/import-tool", "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/import-tool staging", "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/import-tool", - "run-local": "rush bundle --to @hcengineering/import-tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --max-old-space-size=18000 ./bundle/bundle.js", - "run-local-brk": "rush bundle --to @hcengineering/import-tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js", + "run-local": "rush bundle --to @hcengineering/import-tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --max-old-space-size=18000 ./bundle/bundle.js", + "run-local-brk": "rush bundle --to @hcengineering/import-tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js", "run": "rush bundle --to @hcengineering/import-tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js", "upgrade": "rushx run-local upgrade", "format": "format src", diff --git a/dev/local-mongo/docker-compose.yaml b/dev/local-mongo/docker-compose.yaml index 228b33aec0..234b064008 100644 --- a/dev/local-mongo/docker-compose.yaml +++ b/dev/local-mongo/docker-compose.yaml @@ -87,7 +87,6 @@ services: - 'MONGO_OPTIONS={"appName":"front","maxPoolSize":1}' - ACCOUNTS_URL=http://localhost:3000 - UPLOAD_URL=/files - - ELASTIC_URL=http://elastic:9200 - GMAIL_URL=http://localhost:8088 - CALENDAR_URL=http://localhost:8095 - TELEGRAM_URL=http://localhost:8086 @@ -121,7 +120,6 @@ services: - SERVER_PORT=3333 - SERVER_SECRET=secret - ENABLE_COMPRESSION=true - - ELASTIC_URL=http://elastic:9200 - MONGO_URL=mongodb://host.docker.internal:27017?compressors=snappy - 'MONGO_OPTIONS={"appName": "transactor", "maxPoolSize": 10}' - METRICS_CONSOLE=false diff --git a/dev/tool/package.json b/dev/tool/package.json index 120d8723d6..935c93f993 100644 --- a/dev/tool/package.json +++ b/dev/tool/package.json @@ -19,10 +19,10 @@ "docker:tbuild": "docker build -t hardcoreeng/tool . --platform=linux/amd64 && ../../common/scripts/docker_tag_push.sh hardcoreeng/tool", "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging", "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tool", - "run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", - "run-local-pg": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://postgres:example@localhost:5432 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", - "run-local-cr": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", - "run-local-brk": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js", + "run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", + "run-local-pg": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://postgres:example@localhost:5432 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", + "run-local-cr": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", + "run-local-brk": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js", "run": "rush bundle --to @hcengineering/tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js", "upgrade": "rushx run-local upgrade", "format": "format src", diff --git a/dev/tool/src/clean.ts b/dev/tool/src/clean.ts index da7d4f6c4a..6d9d94b5b2 100644 --- a/dev/tool/src/clean.ts +++ b/dev/tool/src/clean.ts @@ -82,7 +82,6 @@ export async function cleanWorkspace ( mongoUrl: string, workspaceId: WorkspaceId, storageAdapter: StorageAdapter, - elasticUrl: string, transactorUrl: string, opt: { recruit: boolean, tracker: boolean, removedTx: boolean } ): Promise { diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index 882a2a14a2..4d99f62fa7 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -167,15 +167,6 @@ export function devTool ( console.error('please provide transactor url.') } - function getElasticUrl (): string { - const elasticUrl = process.env.ELASTIC_URL - if (elasticUrl === undefined) { - console.error('please provide elastic url') - process.exit(1) - } - return elasticUrl - } - const initScriptUrl = process.env.INIT_SCRIPT_URL if (initScriptUrl !== undefined) { setMetadata(toolPlugin.metadata.InitScriptURL, initScriptUrl) @@ -1443,7 +1434,7 @@ export function devTool ( await withDatabase(dbUrl, async (db) => { const wsid = getWorkspaceId(workspace) const endpoint = await getTransactorEndpoint(generateToken(systemAccountEmail, wsid), 'external') - await cleanWorkspace(toolCtx, dbUrl, wsid, adapter, getElasticUrl(), endpoint, cmd) + await cleanWorkspace(toolCtx, dbUrl, wsid, adapter, endpoint, cmd) }) }) }) diff --git a/pods/front/run.sh b/pods/front/run.sh index 747db11121..063127854b 100755 --- a/pods/front/run.sh +++ b/pods/front/run.sh @@ -2,7 +2,6 @@ export ACCOUNTS_URL=http://localhost:3333 export UPLOAD_URL=http://localhost:3333/files -export ELASTIC_URL=http://elastic:9200 export COLLABORATOR_URL=ws://localhost:3078 export MINIO_ENDPOINT=minio export MINIO_ACCESS_KEY=minioadmin diff --git a/qms-tests/docker-compose.yaml b/qms-tests/docker-compose.yaml index 32314d6f7c..17b784b9ff 100644 --- a/qms-tests/docker-compose.yaml +++ b/qms-tests/docker-compose.yaml @@ -99,7 +99,6 @@ services: - ACCOUNTS_URL=http://host.docker.internal:3003 - MONGO_URL=mongodb://mongodb:27018 - UPLOAD_URL=/files - - ELASTIC_URL=http://elastic:9200 - GMAIL_URL=http://host.docker.internal:8088 - CALENDAR_URL=http://host.docker.internal:8095 - REKONI_URL=http://rekoni:4007 diff --git a/qms-tests/restore-local.sh b/qms-tests/restore-local.sh index 8ca9a3d3f4..6eda942b54 100755 --- a/qms-tests/restore-local.sh +++ b/qms-tests/restore-local.sh @@ -3,7 +3,6 @@ export MINIO_ACCESS_KEY=minioadmin export MINIO_SECRET_KEY=minioadmin export MINIO_ENDPOINT=localhost:9000 export MONGO_URL=mongodb://localhost:27017 -export ELASTIC_URL=http://localhost:9200 export SERVER_SECRET=secret # Restore workspace contents in mongo/elastic diff --git a/qms-tests/tool-local.sh b/qms-tests/tool-local.sh index 0e1e3a919e..6a76ff2081 100755 --- a/qms-tests/tool-local.sh +++ b/qms-tests/tool-local.sh @@ -7,7 +7,6 @@ export DB_URL=mongodb://localhost:27017 export ACCOUNT_DB_URL=mongodb://localhost:27017 export ACCOUNTS_URL=http://localhost:3000 export TRANSACTOR_URL=ws://localhost:3333 -export ELASTIC_URL=http://localhost:9200 export SERVER_SECRET=secret # Restore workspace contents in mongo/elastic diff --git a/qms-tests/tool.sh b/qms-tests/tool.sh index 49c7458199..6b05f411ef 100755 --- a/qms-tests/tool.sh +++ b/qms-tests/tool.sh @@ -8,7 +8,6 @@ export TRANSACTOR_URL=ws://localhost:3334 export MONGO_URL=mongodb://localhost:27018 export ACCOUNT_DB_URL=mongodb://localhost:27018 export DB_URL=mongodb://localhost:27018 -export ELASTIC_URL=http://localhost:9201 export SERVER_SECRET=secret export STORAGE_CONFIG="minio|localhost:9002?accessKey=minioadmin&secretKey=minioadmin" diff --git a/server/front/readme.md b/server/front/readme.md index 0baf88ac2c..304e8d24a1 100644 --- a/server/front/readme.md +++ b/server/front/readme.md @@ -6,7 +6,6 @@ Front service is suited to deliver application bundles and resource assets, it a * SERVER_PORT: Specifies the port number on which the server will listen. * MONGO_URL: Specifies the URL of the MongoDB database. -* ELASTIC_URL: Specifies the URL of the Elasticsearch service. * ACCOUNTS_URL: Specifies the URL of the accounts service. * UPLOAD_URL: Specifies the URL for uploading files. * GMAIL_URL: Specifies the URL of the Gmail service. diff --git a/server/front/run.sh b/server/front/run.sh index 11c733e2ea..c1a2e73f67 100755 --- a/server/front/run.sh +++ b/server/front/run.sh @@ -2,7 +2,6 @@ export ACCOUNTS_URL=http://localhost:3333 export UPLOAD_URL=http://localhost:3333/files -export ELASTIC_URL=http://elastic:9200 export MINIO_ENDPOINT=minio export MINIO_ACCESS_KEY=minioadmin export MINIO_SECRET_KEY=minioadmin diff --git a/server/front/src/index.ts b/server/front/src/index.ts index e77d34000d..63b8297934 100644 --- a/server/front/src/index.ts +++ b/server/front/src/index.ts @@ -243,7 +243,6 @@ async function getFile ( export function start ( ctx: MeasureContext, config: { - elasticUrl: string storageAdapter: StorageAdapter accountsUrl: string uploadUrl: string diff --git a/server/front/src/starter.ts b/server/front/src/starter.ts index 2231b174bf..f643b6cead 100644 --- a/server/front/src/starter.ts +++ b/server/front/src/starter.ts @@ -24,12 +24,6 @@ import { start } from '.' export function startFront (ctx: MeasureContext, extraConfig?: Record): void { const SERVER_PORT = parseInt(process.env.SERVER_PORT ?? '8080') - const elasticUrl = process.env.ELASTIC_URL - if (elasticUrl === undefined) { - console.error('please provide elastic url') - process.exit(1) - } - const storageConfig: StorageConfiguration = storageConfigFromEnv() const storageAdapter = buildStorageFromConfig(storageConfig) @@ -120,7 +114,6 @@ export function startFront (ctx: MeasureContext, extraConfig?: Record