Skip to content

Commit

Permalink
dataexchange changes for non-root users
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer committed Jan 10, 2024
1 parent 72a6ea2 commit 8ea90cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/blockchain/ethereum/connector/ethconnect/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (e *Ethconnect) GenerateConfig(stack *types.Stack, member *types.Organizati
RPC: &RPC{URL: fmt.Sprintf("http://%s:8545", blockchainServiceName)},
OpenAPI: &OpenAPI{
EventPollingIntervalSec: 1,
StoragePath: "./abis",
EventsDB: "./events",
StoragePath: "./data/abis",
EventsDB: "./data/events",
},
HTTP: &HTTP{
Port: 8080,
Expand Down
6 changes: 2 additions & 4 deletions internal/blockchain/ethereum/connector/ethconnect/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ func (e *Ethconnect) GetServiceDefinitions(s *types.Stack, dependentServices map
Ports: []string{fmt.Sprintf("%d:8080", member.ExposedConnectorPort)},
Volumes: []string{
fmt.Sprintf("ethconnect_config_%s:/ethconnect/config", member.ID),
fmt.Sprintf("ethconnect_abis_%s:/ethconnect/abis", member.ID),
fmt.Sprintf("ethconnect_events_%s:/ethconnect/events", member.ID),
fmt.Sprintf("ethconnect_data_%s:/ethconnect/data", member.ID),
},
Logging: docker.StandardLogOptions,
},
VolumeNames: []string{
fmt.Sprintf("ethconnect_config_%v", member.ID),
fmt.Sprintf("ethconnect_abis_%v", member.ID),
fmt.Sprintf("ethconnect_events_%v", member.ID),
fmt.Sprintf("ethconnect_data_%v", member.ID),
},
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/stacks/stack_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ func (s *StackManager) copyDataExchangeConfigToVolumes() error {
// Copy files into docker volumes
memberDXDir := path.Join(configDir, "dataexchange_"+member.ID)
volumeName := fmt.Sprintf("%s_dataexchange_%s", s.Stack.Name, member.ID)
docker.MkdirInVolume(s.ctx, volumeName, "data")
docker.MkdirInVolume(s.ctx, volumeName, "peer-certs")
if err := docker.CopyFileToVolume(s.ctx, volumeName, path.Join(memberDXDir, "config.json"), "/config.json"); err != nil {
return err
Expand Down

0 comments on commit 8ea90cc

Please sign in to comment.