mlgym-deploy 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1072,17 +1072,17 @@ function validateAndFixDockerCompose(content) {
1072
1072
  const [external, internal] = portEntry.split(':').map(p => p.trim());
1073
1073
  const webPorts = ['80', '8080', '3000', '4000', '5000', '8000', '9000'];
1074
1074
 
1075
- if (webPorts.includes(internal)) {
1075
+ if (webPorts.includes(internal) && external !== '80') {
1076
1076
  issues.push({
1077
1077
  line: i + 1,
1078
1078
  service: currentService,
1079
1079
  issue: `Port mapping "${external}:${internal}" not allowed`,
1080
- fix: 'Use port "80" only'
1080
+ fix: `Use "80:${internal}" instead`
1081
1081
  });
1082
1082
 
1083
- // Fix the line
1084
- fixed[i] = line.replace(trimmed, '- "80"');
1085
- fixes.push(`Fixed ${currentService}: ${external}:${internal} → 80`);
1083
+ // Fix the line - preserve internal port
1084
+ fixed[i] = line.replace(trimmed, `- "80:${internal}"`);
1085
+ fixes.push(`Fixed ${currentService}: ${external}:${internal} → 80:${internal}`);
1086
1086
  }
1087
1087
  }
1088
1088
  } else if (inPortsSection && !trimmed.startsWith('-')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlgym-deploy",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "MCP server for MLGym - Auto-validates and fixes docker-compose/Dockerfile for Coolify",
5
5
  "main": "index.js",
6
6
  "type": "module",