| 140 | } |
| 141 | |
| 142 | func (s *composeService) ensureNetworks(ctx context.Context, project *types.Project) (map[string]string, error) { |
| 143 | networks := map[string]string{} |
| 144 | for name, nw := range project.Networks { |
| 145 | id, err := s.ensureNetwork(ctx, project, name, &nw) |
| 146 | if err != nil { |
| 147 | return nil, err |
| 148 | } |
| 149 | networks[name] = id |
| 150 | project.Networks[name] = nw |
| 151 | } |
| 152 | return networks, nil |
| 153 | } |
| 154 | |
| 155 | func (s *composeService) ensureProjectVolumes(ctx context.Context, project *types.Project) (map[string]string, error) { |
| 156 | ids := map[string]string{} |