Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
<FormItem className="w-full">
<FormLabel>Service Name</FormLabel>
<div className="flex gap-2">
{services && services.length >0 ? (
<Select
onValueChange={field.onChange}
defaultValue={field.value || ""}
Expand All @@ -313,11 +314,16 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
{service}
</SelectItem>
))}
<SelectItem value="none" disabled>
Empty
</SelectItem>
</SelectContent>
</Select>
</SelectContent>
</Select>
) : (
<FormControl>
<Input
{...field}
placeholder="Enter service name manually"
/>
</FormControl>
)}
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
Expand Down
9 changes: 8 additions & 1 deletion packages/server/src/utils/docker/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ export const cloneComposeRemote = async (compose: Compose) => {
}
};

const parseComposePath = (composePath:string):string => {
if (composePath.startsWith("-f ")) {
return composePath.substring(3).trim();
}
return composePath;
}

export const getComposePath = (compose: Compose) => {
const { COMPOSE_PATH } = paths(!!compose.serverId);
const { appName, sourceType, composePath } = compose;
Expand All @@ -79,7 +86,7 @@ export const getComposePath = (compose: Compose) => {
if (sourceType === "raw") {
path = "docker-compose.yml";
} else {
path = composePath;
path = parseComposePath(composePath);
}

return join(COMPOSE_PATH, appName, "code", path);
Expand Down