[release] v0.6.4-unstable

This commit is contained in:
Yann Stepienik 2023-06-07 17:40:17 +01:00
parent 2fdcd9ee70
commit c28a5c51e2
2 changed files with 23 additions and 15 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "cosmos-server", "name": "cosmos-server",
"version": "0.6.3", "version": "0.6.4-unstable",
"description": "", "description": "",
"main": "test-server.js", "main": "test-server.js",
"bugs": { "bugs": {

View file

@ -40,28 +40,36 @@ func NewDB(w http.ResponseWriter, req *http.Request) (string, error) {
imageName = "mongo:4.4" imageName = "mongo:4.4"
} }
err := RunContainer( service := DockerServiceCreateRequest{
imageName, Services: map[string]ContainerCreateRequestContainer {},
monHost, }
[]string{
service.Services[monHost] = ContainerCreateRequestContainer{
Name: monHost,
Image: imageName,
RestartPolicy: "always",
Environment: []string{
"MONGO_INITDB_ROOT_USERNAME=" + mongoUser, "MONGO_INITDB_ROOT_USERNAME=" + mongoUser,
"MONGO_INITDB_ROOT_PASSWORD=" + mongoPass, "MONGO_INITDB_ROOT_PASSWORD=" + mongoPass,
}, },
[]VolumeMount{ Labels: map[string]string{
"cosmos-force-network-secured": "true",
},
Volumes: []mount.Mount{
{ {
Destination: "/data/db", Type: mount.TypeVolume,
Volume: &types.Volume{ Source: "cosmos-mongo-data-" + id,
Name: "cosmos-mongo-data-" + id, Target: "/data/db",
},
}, },
{ {
Destination: "/data/configdb", Type: mount.TypeVolume,
Volume: &types.Volume{ Source: "cosmos-mongo-config-" + id,
Name: "cosmos-mongo-config-" + id, Target: "/data/configdb",
},
}, },
}, },
) };
err := CreateService(w, req, service)
if err != nil { if err != nil {
return "", err return "", err