fix(traefik): update remote config writing to use base64 encoding

- Modified the `writeConfigRemote` function to encode the Traefik configuration in base64 before saving it to the remote YAML file.
- This change ensures that the configuration is correctly handled and prevents potential issues with special characters in the config.
This commit is contained in:
Mauricio Siu
2026-05-08 23:54:40 -06:00
parent fef2de1ec5
commit 06a349152f
@@ -218,7 +218,11 @@ export const writeConfigRemote = async (
try {
const { DYNAMIC_TRAEFIK_PATH } = paths(true);
const configPath = path.join(DYNAMIC_TRAEFIK_PATH, `${appName}.yml`);
await execAsyncRemote(serverId, `echo '${traefikConfig}' > ${configPath}`);
const encoded = encodeBase64(traefikConfig);
await execAsyncRemote(
serverId,
`echo "${encoded}" | base64 -d > "${configPath}"`,
);
} catch (e) {
console.error("Error saving the YAML config file:", e);
}