freescout #16

Open
cronekorkn wants to merge 6 commits from freescout into master
3 changed files with 40 additions and 36 deletions
Showing only changes of commit 12c5b86cc5 - Show all commits

View file

@ -41,15 +41,19 @@ actions = {
}, },
} }
# files = { files = {
# '/opt/freescout/.env': { '/opt/freescout/.env': {
# 'content': '\n'.join( # https://github.com/freescout-helpdesk/freescout/blob/dist/.env.example
# f'{k}={v}' for k, v in # Every time you are making changes in .env file, in order changes to take an effect you need to run:
# sorted(node.metadata.get('freescout/env').items()) # ´sudo su - www-data -c 'php /opt/freescout/artisan freescout:clear-cache' -s /bin/bash´
# ), 'owner': 'www-data',
# 'needs': [ 'content': '\n'.join(
# 'directory:/opt/freescout', f'{k}={v}' for k, v in
# 'action:clone_freescout', sorted(node.metadata.get('freescout/env').items())
# ], ) + '\n',
# }, 'needs': [
# } 'directory:/opt/freescout',
'action:clone_freescout',
],
},
}

View file

@ -16,18 +16,18 @@ defaults = {
'php-intl': {}, 'php-intl': {},
}, },
}, },
# 'freescout': { 'freescout': {
# 'env': { 'env': {
# 'APP_TIMEZONE': 'Europe/Berlin', 'APP_TIMEZONE': 'Europe/Berlin',
# 'DB_CONNECTION': 'pgsql', 'DB_CONNECTION': 'pgsql',
# 'DB_HOST': '127.0.0.1', 'DB_HOST': '127.0.0.1',
# 'DB_PORT': '5432', 'DB_PORT': '5432',
# 'DB_DATABASE': 'freescout', 'DB_DATABASE': 'freescout',
# 'DB_USERNAME': 'freescout', 'DB_USERNAME': 'freescout',
# 'DB_PASSWORD': database_password, 'DB_PASSWORD': database_password,
# 'APP_KEY': 'base64:' + repo.vault.random_bytes_as_base64_for(f'{node.name} freescout APP_KEY', length=32).value 'APP_KEY': 'base64:' + repo.vault.random_bytes_as_base64_for(f'{node.name} freescout APP_KEY', length=32).value
# }, },
# }, },
'php': { 'php': {
'php.ini': { 'php.ini': {
'cgi': { 'cgi': {
@ -57,17 +57,17 @@ defaults = {
} }
# @metadata_reactor.provides( @metadata_reactor.provides(
# 'freescout/env/APP_URL', 'freescout/env/APP_URL',
# ) )
# def freescout(metadata): def freescout(metadata):
# return { return {
# 'freescout': { 'freescout': {
# 'env': { 'env': {
# 'APP_URL': 'https://' + metadata.get('freescout/domain') + '/', 'APP_URL': 'https://' + metadata.get('freescout/domain') + '/',
# }, },
# }, },
# } }
@metadata_reactor.provides( @metadata_reactor.provides(

View file

@ -91,4 +91,4 @@ def require_bundle(node, bundle, hint=''):
from shlex import quote from shlex import quote
def run_as(user, command): def run_as(user, command):
return f'sudo su - {user} -c {quote(command)} -s /bin/bash' return f'sudo su - {user} -s /bin/bash -c {quote(command)}'