mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-07 04:39:32 -06:00
[release] v0.16.0-unstable41
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- Default networks to 16 Ips instead of 8
|
||||
- Further improving the docker-compose import to mimic naming and hostnaming convention
|
||||
- Added hostname stickiness to compose network namespaces
|
||||
- Added depends_on conditions to compose import
|
||||
- Fixed issues with container's monitoring when name contains a dot (Thanks @BearTS)
|
||||
- Added email on succesful login (Thanks @BearTS)
|
||||
- Add support for runtime (Thanks @ryan-schubert)
|
||||
|
||||
@@ -112,6 +112,8 @@ const RouteManagement = ({ routeConfig, routeNames, config, TargetContainer, noC
|
||||
|
||||
fullValues = sanitizeRoute(fullValues);
|
||||
|
||||
console.log(fullValues)
|
||||
|
||||
let op;
|
||||
if(newRoute) {
|
||||
op = API.config.newRoute(routeConfig.Name, fullValues)
|
||||
|
||||
@@ -211,9 +211,7 @@ const convertDockerCompose = (config, serviceName, dockerCompose, setYmlError) =
|
||||
|
||||
// convert devices
|
||||
if (doc.services[key].devices) {
|
||||
console.log(1)
|
||||
if (Array.isArray(doc.services[key].devices)) {
|
||||
console.log(2)
|
||||
let devices = [];
|
||||
doc.services[key].devices.forEach((device) => {
|
||||
if(device.indexOf(':') === -1) {
|
||||
@@ -237,8 +235,12 @@ const convertDockerCompose = (config, serviceName, dockerCompose, setYmlError) =
|
||||
if (doc.services[key].depends_on) {
|
||||
if (Array.isArray(doc.services[key].depends_on)) {
|
||||
let depends_on = {};
|
||||
doc.services[key].depends_on.forEach((depend) => {
|
||||
depends_on['' + depend] = {};
|
||||
doc.services[key].depends_on.forEach((depend, index) => {
|
||||
if (typeof depend === 'object') {
|
||||
depends_on[index] = depend;
|
||||
} else {
|
||||
depends_on['' + depend] = {};
|
||||
}
|
||||
});
|
||||
doc.services[key].depends_on = depends_on;
|
||||
}
|
||||
@@ -290,13 +292,29 @@ const convertDockerCompose = (config, serviceName, dockerCompose, setYmlError) =
|
||||
Object.keys(doc.services).forEach((potentialMatch) => {
|
||||
if (doc.services[potentialMatch].old_key === depend) {
|
||||
let name = doc.services[potentialMatch].container_name || potentialMatch;
|
||||
doc.services[key].depends_on[name] = {};
|
||||
delete doc.services[key].depends_on[depend];
|
||||
doc.services[key].depends_on[name] = doc.services[key].depends_on[depend];
|
||||
if (name !== depend) {
|
||||
delete doc.services[key].depends_on[depend];
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// ensure network mode names
|
||||
Object.keys(doc.services).forEach((key) => {
|
||||
if (doc.services[key].network_mode) {
|
||||
if (doc.services[key].network_mode && doc.services[key].network_mode.startsWith('service:')) {
|
||||
let service = doc.services[key].network_mode.split(':')[1];
|
||||
Object.keys(doc.services).forEach((potentialMatch) => {
|
||||
if (doc.services[potentialMatch].old_key === service) {
|
||||
doc.services[key].network_mode = 'service:' + (doc.services[potentialMatch].container_name || potentialMatch);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// clean up old-keys
|
||||
Object.keys(doc.services).forEach((key) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.16.0-unstable40",
|
||||
"version": "0.16.0-unstable41",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<h3 align="center">Thanks to the sponsors:</h3></br>
|
||||
<p align="center"><a href="https://github.com/dalekcoffee"><img src="https://avatars.githubusercontent.com/dalekcoffee" style="border-radius:48px" width="48" height="48" alt="Dalek" title="Dalek" /></a>
|
||||
<a href="https://github.com/soldier1"><img src="https://avatars.githubusercontent.com/soldier1" style="border-radius:48px" width="48" height="48" alt="null" title="null" /></a>
|
||||
<a href="https://github.com/Serph91P"><img src="https://avatars.githubusercontent.com/Serph91P" style="border-radius:48px" width="48" height="48" alt="Seraph91P" title="Seraph91P" /></a>
|
||||
<a href="https://github.com/DGAzr"><img src="https://avatars.githubusercontent.com/DGAzr" style="border-radius:48px" width="48" height="48" alt="null" title="null" /></a>
|
||||
<a href="https://github.com/Fortcraft"><img src="https://avatars.githubusercontent.com/Fortcraft" style="border-radius:48px" width="48" height="48" alt="null" title="null" /></a>
|
||||
<a href="https://github.com/Gordi90"><img src="https://avatars.githubusercontent.com/Gordi90" style="border-radius:48px" width="48" height="48" alt="Dér Kristóf Gordon" title="Dér Kristóf Gordon" /></a>
|
||||
|
||||
@@ -105,9 +105,11 @@ func ConfigApiPatch(w http.ResponseWriter, req *http.Request) {
|
||||
map[string]interface{}{
|
||||
})
|
||||
|
||||
utils.RestartHTTPServer()
|
||||
constellation.RestartNebula()
|
||||
|
||||
go (func () {
|
||||
constellation.RestartNebula()
|
||||
utils.RestartHTTPServer()
|
||||
})()
|
||||
|
||||
if updateReq.NewRoute != nil && updateReq.NewRoute.Mode == "SERVAPP" {
|
||||
utils.Log("RouteSettingsUpdate: Service needs update: "+updateReq.NewRoute.Target)
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ func ConfigApiSet(w http.ResponseWriter, req *http.Request) {
|
||||
utils.InitFBL()
|
||||
utils.DisconnectDB()
|
||||
authorizationserver.Init()
|
||||
utils.RestartHTTPServer()
|
||||
constellation.RestartNebula()
|
||||
go (func() {
|
||||
constellation.RestartNebula()
|
||||
utils.RestartHTTPServer()
|
||||
cron.InitJobs()
|
||||
cron.InitScheduler()
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user