mythix 2.5.6 → 2.5.8
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.
package/package.json
CHANGED
package/src/cli/cli-utils.js
CHANGED
|
@@ -478,7 +478,7 @@ async function executeCommand(_config, appOptions, commandContext, CommandKlass,
|
|
|
478
478
|
args,
|
|
479
479
|
{
|
|
480
480
|
env: {
|
|
481
|
-
NODE_ENV: commandContext.environment ||
|
|
481
|
+
NODE_ENV: commandContext.environment || process.env.NODE_ENV,
|
|
482
482
|
MYTHIX_RUNTIME: runtime,
|
|
483
483
|
MYTHIX_CONFIG_PATH: configPath,
|
|
484
484
|
MYTHIX_COMMAND_PATH: commandPath,
|
|
@@ -709,11 +709,14 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
|
|
|
709
709
|
return await target.finalizeDeploy.call(this, target, deployConfig);
|
|
710
710
|
|
|
711
711
|
if (target.index === 0) {
|
|
712
|
-
let targetLocation = `"${decodeURIComponent(target.pathname)}/"`;
|
|
712
|
+
let targetLocation = `"${decodeURIComponent(target.pathname)}/current"`;
|
|
713
|
+
|
|
714
|
+
let serviceUser = target.serviceUser || target.uri.username;
|
|
715
|
+
let serviceGroup = target.serviceGroup || serviceUser;
|
|
713
716
|
|
|
714
717
|
await this.executeRemoteCommands(target, deployConfig, [
|
|
715
|
-
{ command: 'cd', args: [ targetLocation ]
|
|
716
|
-
{ command: '
|
|
718
|
+
{ sudo: false, command: 'cd', args: [ targetLocation ] },
|
|
719
|
+
{ sudo: false, command: 'sudo', args: [ '-u', serviceUser, '-g', serviceGroup, `NODE_ENV=${deployConfig.target} mythix-cli migrate` ] },
|
|
717
720
|
]);
|
|
718
721
|
}
|
|
719
722
|
|