Skip to content

Commit

Permalink
DA-608 Update tezosconnect volumes
Browse files Browse the repository at this point in the history
Signed-off-by: Dzianis Andreyenka <andreenkodn@gmail.com>
  • Loading branch information
denisandreenko committed Aug 5, 2024
1 parent bea8476 commit 26f8948
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/blockchain/tezos/connector/tezosconnect/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (t *Tezosconnect) GenerateConfig(stack *types.Stack, org *types.Organizatio
},
Persistence: &PersistenceConfig{
LevelDB: &LevelDBConfig{
Path: "/tezosconnect/leveldb",
Path: "/tezosconnect/db/leveldb",
},
},
FFCore: &FFCoreConfig{
Expand Down
10 changes: 5 additions & 5 deletions internal/blockchain/tezos/connector/tezosconnect/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ func (t *Tezosconnect) GetServiceDefinitions(s *types.Stack, dependentServices m
}
serviceDefinitions := make([]*docker.ServiceDefinition, len(s.Members))
for i, member := range s.Members {
dataVolumeName := fmt.Sprintf("tezosconnect_data_%s", member.ID)
serviceDefinitions[i] = &docker.ServiceDefinition{
ServiceName: "tezosconnect_" + member.ID,
Service: &docker.Service{
Image: s.VersionManifest.Tezosconnect.GetDockerImageString(),
ContainerName: fmt.Sprintf("%s_tezosconnect_%v", s.Name, i),
Command: "-f /tezosconnect/config/config.yaml",
Command: "-f /tezosconnect/config.yaml",
DependsOn: dependsOn,
Ports: []string{fmt.Sprintf("%d:%v", member.ExposedConnectorPort, t.Port())},
Volumes: []string{
fmt.Sprintf("tezosconnect_config_%s:/tezosconnect/config", member.ID),
fmt.Sprintf("tezosconnect_leveldb_%s:/tezosconnect/leveldb", member.ID),
fmt.Sprintf("%s/config/tezosconnect_%s.yaml:/tezosconnect/config.yaml", s.RuntimeDir, member.ID),
fmt.Sprintf("%s:/tezosconnect/db", dataVolumeName),
},
Logging: docker.StandardLogOptions,
Environment: s.EnvironmentVars,
},
VolumeNames: []string{
fmt.Sprintf("tezosconnect_config_%s", member.ID),
fmt.Sprintf("tezosconnect_leveldb_%s", member.ID),
dataVolumeName,
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestGetServiceDefinition(t *testing.T) {
serviceDefinitions := tezos.GetServiceDefinitions(tc.Members, tc.DependentServices)
assert.NotNil(t, serviceDefinitions)

expectedCommand := "-f /tezosconnect/config/config.yaml"
expectedCommand := "-f /tezosconnect/config.yaml"
if serviceDefinitions[0].Service.Command != expectedCommand {
t.Errorf("Expected Command %q, got %q", expectedCommand, serviceDefinitions[0].Service.Command)
}
Expand Down

0 comments on commit 26f8948

Please sign in to comment.