( //nolint:funlen cfg *model.ConfigConfig, subdomain string, projectName string, httpPort uint, useTLS bool, postgresPort uint, nhostFolder string, dotNhostFolder string, rootFolder string, ports ExposePorts, branch string, dashboardVersion string, functionsVersion string, configserverImage string, appID string, startFunctions bool, caCertificatesPath string, runServices ...*RunService, )
| 767 | } |
| 768 | |
| 769 | func ComposeFileFromConfig( //nolint:funlen |
| 770 | cfg *model.ConfigConfig, |
| 771 | subdomain string, |
| 772 | projectName string, |
| 773 | httpPort uint, |
| 774 | useTLS bool, |
| 775 | postgresPort uint, |
| 776 | nhostFolder string, |
| 777 | dotNhostFolder string, |
| 778 | rootFolder string, |
| 779 | ports ExposePorts, |
| 780 | branch string, |
| 781 | dashboardVersion string, |
| 782 | functionsVersion string, |
| 783 | configserverImage string, |
| 784 | appID string, |
| 785 | startFunctions bool, |
| 786 | caCertificatesPath string, |
| 787 | runServices ...*RunService, |
| 788 | ) (*ComposeFile, error) { |
| 789 | services, err := getServices( |
| 790 | cfg, |
| 791 | subdomain, |
| 792 | projectName, |
| 793 | httpPort, |
| 794 | useTLS, |
| 795 | postgresPort, |
| 796 | nhostFolder, |
| 797 | dotNhostFolder, |
| 798 | rootFolder, |
| 799 | ports, |
| 800 | branch, |
| 801 | dashboardVersion, |
| 802 | functionsVersion, |
| 803 | configserverImage, |
| 804 | appID, |
| 805 | startFunctions, |
| 806 | runServices..., |
| 807 | ) |
| 808 | if err != nil { |
| 809 | return nil, err |
| 810 | } |
| 811 | |
| 812 | volumes := map[string]struct{}{ |
| 813 | rootNodeModules(branch): {}, |
| 814 | "pgdata_" + sanitizeBranch(branch): {}, |
| 815 | "minio_" + sanitizeBranch(branch): {}, |
| 816 | "mailhog_" + sanitizeBranch(branch): {}, |
| 817 | } |
| 818 | |
| 819 | if startFunctions { |
| 820 | volumes[functionsNodeModules(branch)] = struct{}{} |
| 821 | } |
| 822 | |
| 823 | for _, runService := range runServices { |
| 824 | for _, s := range runService.Config.GetResources().GetStorage() { |
| 825 | volumes[runVolumeName(runService.Config.Name, s.GetName(), branch)] = struct{}{} |
| 826 | } |
no test coverage detected