bw/matrix-dimension switch to dedicated user
This commit is contained in:
parent
3bcda42a77
commit
ad7582e38a
3 changed files with 8 additions and 8 deletions
|
@ -3,8 +3,8 @@ Description=Matrix Dimension
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=matrix-support
|
User=matrix-dimension
|
||||||
Group=matrix-support
|
Group=matrix-dimension
|
||||||
Environment="NODE_ENV=production"
|
Environment="NODE_ENV=production"
|
||||||
ExecStart=/usr/bin/node ${config['install_dir']}/build/app/index.js
|
ExecStart=/usr/bin/node ${config['install_dir']}/build/app/index.js
|
||||||
WorkingDirectory=${config['install_dir']}
|
WorkingDirectory=${config['install_dir']}
|
||||||
|
|
|
@ -3,8 +3,8 @@ repo.libs.tools.require_bundle(node, 'nodejs')
|
||||||
|
|
||||||
directories = {
|
directories = {
|
||||||
node.metadata['matrix-dimension']['install_dir']: {
|
node.metadata['matrix-dimension']['install_dir']: {
|
||||||
'owner': 'matrix-support',
|
'owner': 'matrix-dimension',
|
||||||
'group': 'matrix-support',
|
'group': 'matrix-dimension',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ git_deploy = {
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
'{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']): {
|
'{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']): {
|
||||||
'owner': 'matrix-support',
|
'owner': 'matrix-dimension',
|
||||||
'group': 'matrix-support',
|
'group': 'matrix-dimension',
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'context': {
|
'context': {
|
||||||
'config': node.metadata.get('matrix-dimension', {}),
|
'config': node.metadata.get('matrix-dimension', {}),
|
||||||
|
@ -49,7 +49,7 @@ files = {
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
'matrix_dimension_build': {
|
'matrix_dimension_build': {
|
||||||
'command': 'cd ' + node.metadata['matrix-dimension']['install_dir'] + ' && sudo -u matrix-support npm install && sudo -u matrix-support npm run build',
|
'command': 'cd ' + node.metadata['matrix-dimension']['install_dir'] + ' && sudo -u matrix-dimension npm install && sudo -u matrix-dimension npm run build',
|
||||||
'needs': {
|
'needs': {
|
||||||
'pkg_apt:nodejs',
|
'pkg_apt:nodejs',
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,7 +27,7 @@ defaults = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'users': {
|
'users': {
|
||||||
'matrix-support': {
|
'matrix-dimension': {
|
||||||
'home': '/var/opt/matrix-dimension',
|
'home': '/var/opt/matrix-dimension',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue