refactor: add localhos traefik domains

This commit is contained in:
Mauricio Siu
2024-08-22 00:02:02 -06:00
parent ac1637eaf8
commit 7b9abef687
3 changed files with 27 additions and 125 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export const generateRandomDomain = ({
}: Schema): string => {
const hash = randomBytes(3).toString("hex");
const slugIp = serverIp.replaceAll(".", "-");
return `${projectName}-${hash}-${slugIp}.traefik.me`;
return `${projectName}-${hash}${process.env.NODE_ENV === "production" ? `-${slugIp}` : ""}.traefik.me`;
};
export const generateHash = (projectName: string, quantity = 3): string => {