Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b69c96c240 | |||
| 9ee8851d03 |
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2026-03-16 - 1.17.2 - fix(platform-services)
|
||||||
provision ClickHouse, MinIO, and MongoDB resources via docker exec instead of host port access
|
provision ClickHouse, MinIO, and MongoDB resources via docker exec instead of host port access
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/onebox",
|
"name": "@serve.zone/onebox",
|
||||||
"version": "1.17.2",
|
"version": "1.17.3",
|
||||||
"exports": "./mod.ts",
|
"exports": "./mod.ts",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"test": "deno test --allow-all test/",
|
"test": "deno test --allow-all test/",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/onebox",
|
"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",
|
"description": "Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers",
|
||||||
"main": "mod.ts",
|
"main": "mod.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/onebox',
|
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'
|
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
|
|
||||||
getDefaultConfig(): IPlatformServiceConfig {
|
getDefaultConfig(): IPlatformServiceConfig {
|
||||||
return {
|
return {
|
||||||
image: 'mongo:7',
|
image: 'mongo:4.4',
|
||||||
port: 27017,
|
port: 27017,
|
||||||
volumes: ['/var/lib/onebox/mongodb:/data/db'],
|
volumes: ['/var/lib/onebox/mongodb:/data/db'],
|
||||||
environment: {
|
environment: {
|
||||||
@@ -165,7 +165,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
// This avoids network issues with overlay networks
|
// This avoids network issues with overlay networks
|
||||||
const result = await this.oneboxRef.docker.execInContainer(
|
const result = await this.oneboxRef.docker.execInContainer(
|
||||||
platformService.containerId,
|
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) {
|
if (result.exitCode === 0) {
|
||||||
@@ -201,8 +201,8 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
const escapedPassword = password.replace(/'/g, "'\\''");
|
const escapedPassword = password.replace(/'/g, "'\\''");
|
||||||
const escapedAdminPassword = adminCreds.password.replace(/'/g, "'\\''");
|
const escapedAdminPassword = adminCreds.password.replace(/'/g, "'\\''");
|
||||||
|
|
||||||
// Create database and user via mongosh inside the container
|
// Create database and user via mongo inside the container
|
||||||
const mongoshScript = `
|
const mongoScript = `
|
||||||
db = db.getSiblingDB('${dbName}');
|
db = db.getSiblingDB('${dbName}');
|
||||||
db.createCollection('_onebox_init');
|
db.createCollection('_onebox_init');
|
||||||
db.createUser({
|
db.createUser({
|
||||||
@@ -216,12 +216,12 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
const result = await this.oneboxRef.docker.execInContainer(
|
const result = await this.oneboxRef.docker.execInContainer(
|
||||||
platformService.containerId,
|
platformService.containerId,
|
||||||
[
|
[
|
||||||
'mongosh',
|
'mongo',
|
||||||
'--username', adminCreds.username,
|
'--username', adminCreds.username,
|
||||||
'--password', escapedAdminPassword,
|
'--password', escapedAdminPassword,
|
||||||
'--authenticationDatabase', 'admin',
|
'--authenticationDatabase', 'admin',
|
||||||
'--quiet',
|
'--quiet',
|
||||||
'--eval', mongoshScript,
|
'--eval', mongoScript,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
|
|
||||||
logger.info(`Deprovisioning MongoDB database '${resource.resourceName}'...`);
|
logger.info(`Deprovisioning MongoDB database '${resource.resourceName}'...`);
|
||||||
|
|
||||||
const mongoshScript = `
|
const mongoScript = `
|
||||||
db = db.getSiblingDB('${resource.resourceName}');
|
db = db.getSiblingDB('${resource.resourceName}');
|
||||||
try { db.dropUser('${credentials.username}'); } catch(e) { print('User drop failed: ' + e); }
|
try { db.dropUser('${credentials.username}'); } catch(e) { print('User drop failed: ' + e); }
|
||||||
db.dropDatabase();
|
db.dropDatabase();
|
||||||
@@ -278,12 +278,12 @@ export class MongoDBProvider extends BasePlatformServiceProvider {
|
|||||||
const result = await this.oneboxRef.docker.execInContainer(
|
const result = await this.oneboxRef.docker.execInContainer(
|
||||||
platformService.containerId,
|
platformService.containerId,
|
||||||
[
|
[
|
||||||
'mongosh',
|
'mongo',
|
||||||
'--username', adminCreds.username,
|
'--username', adminCreds.username,
|
||||||
'--password', escapedAdminPassword,
|
'--password', escapedAdminPassword,
|
||||||
'--authenticationDatabase', 'admin',
|
'--authenticationDatabase', 'admin',
|
||||||
'--quiet',
|
'--quiet',
|
||||||
'--eval', mongoshScript,
|
'--eval', mongoScript,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/onebox',
|
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'
|
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user