mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
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:
@@ -218,7 +218,11 @@ export const writeConfigRemote = async (
|
|||||||
try {
|
try {
|
||||||
const { DYNAMIC_TRAEFIK_PATH } = paths(true);
|
const { DYNAMIC_TRAEFIK_PATH } = paths(true);
|
||||||
const configPath = path.join(DYNAMIC_TRAEFIK_PATH, `${appName}.yml`);
|
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) {
|
} catch (e) {
|
||||||
console.error("Error saving the YAML config file:", e);
|
console.error("Error saving the YAML config file:", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user