更新部分镜像版本

This commit is contained in:
2024-10-10 17:18:00 +00:00
committed by cloud-init created default user
parent 00f679a0f6
commit f084d89eab
13 changed files with 126 additions and 10 deletions

View File

@@ -0,0 +1,44 @@
const http = require('http');
const response = http.request(
{
host: '0.0.0.0',
method: 'GET',
path: '/info',
port: 8080,
timeout: 2000,
},
(res) => {
let body = '';
res.setEncoding('utf8');
res.on('data', (chunk) => {
body += chunk;
});
res.on('end', () => {
if (res.statusCode === 200) {
const payload = JSON.parse(body);
switch (payload.status) {
case 1:
case 3:
console.log('HEALTHCHECK: online');
process.exit(0);
case 2:
default:
console.log('HEALTHCHECK: offline');
}
} else {
console.log('HEALTHCHECK: offline');
}
process.exit(1);
});
}
);
response.on('error', function (err) {
console.log('HEALTHCHECK: offline');
process.exit(1);
});
response.end();

View File

@@ -0,0 +1,3 @@
db.newsynclogs.createIndex( { "expiresAt": 1 }, { expireAfterSeconds: 0 } );
db.newsynclogs.createIndex( { "ipAddress": 1 } );
db.bookmarks.createIndex( { "lastAccessed": 1 }, { expireAfterSeconds: 21*86400 } );

View File

@@ -0,0 +1,16 @@
{
"location": "JP",
"maxSyncs": "10000",
"maxSyncSize": "10485760",
"db": {
"host": "xbrowsersync-db",
"name": "xbrowsersync",
"username": "xbrowsersync",
"password": "aP7xvybVU6ZdVKWkTp7NjbcYuFdH5YR6Gi3aFrvdT4kbJ3aKwFqB4GnxYyao5DgR"
},
"status": {
"allowNewSyncs": "true",
"online": "true",
"message": "Welcome to the HTY1024 xBrowserSync service! We run the latest version of the xBrowserSync API and take database backups daily."
}
}