Compare commits

..

2 Commits

Author SHA1 Message Date
b69c96c240 v1.17.3
Some checks failed
CI / Build Test (Current Platform) (push) Failing after 6s
Publish to npm / npm-publish (push) Failing after 8s
CI / Type Check & Lint (push) Failing after 32s
CI / Build All Platforms (push) Successful in 2m4s
Release / build-and-release (push) Successful in 3m13s
2026-03-16 13:05:47 +00:00
9ee8851d03 fix(mongodb): downgrade the MongoDB service image to 4.4 and use the legacy mongo shell for container operations 2026-03-16 13:05:47 +00:00
7 changed files with 20 additions and 14 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 2026-03-16 - 1.17.3 - fix(mongodb)
downgrade the MongoDB service image to 4.4 and use the legacy mongo shell for container operations
- changes the default MongoDB container image from mongo:7 to mongo:4.4
- replaces mongosh with mongo for health checks, provisioning, and deprovisioning inside the container
## 2026-03-16 - 1.17.2 - fix(platform-services)
provision ClickHouse, MinIO, and MongoDB resources via docker exec instead of host port access

View File

@@ -1,6 +1,6 @@
{
"name": "@serve.zone/onebox",
"version": "1.17.2",
"version": "1.17.3",
"exports": "./mod.ts",
"tasks": {
"test": "deno test --allow-all test/",

View File

@@ -1,6 +1,6 @@
{
"name": "@serve.zone/onebox",
"version": "1.17.2",
"version": "1.17.3",
"description": "Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers",
"main": "mod.ts",
"type": "module",

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/onebox',
version: '1.17.2',
version: '1.17.3',
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
}

View File

@@ -28,7 +28,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
getDefaultConfig(): IPlatformServiceConfig {
return {
image: 'mongo:7',
image: 'mongo:4.4',
port: 27017,
volumes: ['/var/lib/onebox/mongodb:/data/db'],
environment: {
@@ -165,7 +165,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
// This avoids network issues with overlay networks
const result = await this.oneboxRef.docker.execInContainer(
platformService.containerId,
['mongosh', '--eval', 'db.adminCommand("ping")', '--username', adminCreds.username, '--password', adminCreds.password, '--authenticationDatabase', 'admin', '--quiet']
['mongo', '--eval', 'db.adminCommand("ping")', '--username', adminCreds.username, '--password', adminCreds.password, '--authenticationDatabase', 'admin', '--quiet']
);
if (result.exitCode === 0) {
@@ -201,8 +201,8 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
const escapedPassword = password.replace(/'/g, "'\\''");
const escapedAdminPassword = adminCreds.password.replace(/'/g, "'\\''");
// Create database and user via mongosh inside the container
const mongoshScript = `
// Create database and user via mongo inside the container
const mongoScript = `
db = db.getSiblingDB('${dbName}');
db.createCollection('_onebox_init');
db.createUser({
@@ -216,12 +216,12 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
const result = await this.oneboxRef.docker.execInContainer(
platformService.containerId,
[
'mongosh',
'mongo',
'--username', adminCreds.username,
'--password', escapedAdminPassword,
'--authenticationDatabase', 'admin',
'--quiet',
'--eval', mongoshScript,
'--eval', mongoScript,
]
);
@@ -268,7 +268,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
logger.info(`Deprovisioning MongoDB database '${resource.resourceName}'...`);
const mongoshScript = `
const mongoScript = `
db = db.getSiblingDB('${resource.resourceName}');
try { db.dropUser('${credentials.username}'); } catch(e) { print('User drop failed: ' + e); }
db.dropDatabase();
@@ -278,12 +278,12 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
const result = await this.oneboxRef.docker.execInContainer(
platformService.containerId,
[
'mongosh',
'mongo',
'--username', adminCreds.username,
'--password', escapedAdminPassword,
'--authenticationDatabase', 'admin',
'--quiet',
'--eval', mongoshScript,
'--eval', mongoScript,
]
);

File diff suppressed because one or more lines are too long

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/onebox',
version: '1.17.2',
version: '1.17.3',
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
}