Add full cross-platform path support

- Added automatic volume path translation in deployment (deploy.js)
- Updated FileBrowser template to use /opt/ instead of hard-coded E:/
- Migrated self-updater.js to use centralized platformPaths module
- Updated UI placeholders to use platform-neutral paths (/media/)
- All paths now automatically adapt to Windows or Linux at runtime via process.platform detection
This commit is contained in:
Krystie
2026-03-14 06:52:18 +01:00
parent e615f24627
commit df0daaad46
4 changed files with 17 additions and 11 deletions

View File

@@ -106,13 +106,20 @@ module.exports = function(ctx, helpers) {
throw new Error(`[DC-203] Port conflict detected: ${conflictDetails}. Please choose a different port.`);
}
// Translate volume paths for cross-platform compatibility
const translatedVolumes = (processedTemplate.docker.volumes || []).map(volume => {
const [hostPath, ...rest] = volume.split(':');
const translatedHost = platformPaths.toDockerMountPath(hostPath);
return rest.length > 0 ? `${translatedHost}:${rest.join(':')}` : translatedHost;
});
const containerConfig = {
Image: processedTemplate.docker.image,
name: containerName,
ExposedPorts: {},
HostConfig: {
PortBindings: {},
Binds: processedTemplate.docker.volumes || [],
Binds: translatedVolumes,
RestartPolicy: { Name: 'unless-stopped' },
LogConfig: DOCKER.LOG_CONFIG
},