Fix Motech install

This commit is contained in:
Disassembler 2019-12-10 11:22:46 +01:00
parent 376a0f87ef
commit ed997ab417
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 30 additions and 6 deletions

View File

@ -12,8 +12,9 @@ cp postgres_data/postgresql.conf /srv/motech/postgres_data/postgresql.conf
cp postgres_data/pg_hba.conf /srv/motech/postgres_data/pg_hba.conf cp postgres_data/pg_hba.conf /srv/motech/postgres_data/pg_hba.conf
# Configure ActiveMQ # Configure ActiveMQ
mkdir -p /srv/motech/activemq_data mkdir -p /srv/motech/activemq_conf /srv/motech/activemq_data
chown -R 161616:161616 /srv/motech/activemq_data cp activemq_conf/activemq.xml /srv/motech/activemq_conf/activemq.xml
chown -R 161616:161616 /srv/motech/activemq_conf /srv/motech/activemq_data
# Create database # Create database
export MOTECH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export MOTECH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
@ -49,5 +50,3 @@ service lxc-motech-postgres stop
# Register application # Register application
vmmgr register-app motech motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}" vmmgr register-app motech motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}"
TODO: move the activemq conf here

View File

@ -0,0 +1,25 @@
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core"
schedulerSupport="true"
useJmx="true"
brokerName="localhost"
dataDirectory="${activemq.data}">
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>
</broker>
</beans>

View File

@ -14,13 +14,13 @@
"motech-postgres" "motech-postgres"
], ],
"mounts": [ "mounts": [
["DIR", "/srv/motech/motech_data", "/srv/motech/data/files"], ["DIR", "/srv/motech/motech_conf", "/srv/tomcat/.motech"]
["FILE", "/srv/motech/motech_conf/config.php", "/srv/motech/config.php"]
] ]
}, },
"motech-activemq": { "motech-activemq": {
"image": "activemq_5.15.9-190620", "image": "activemq_5.15.9-190620",
"mounts": [ "mounts": [
["FILE", "/srv/motech/activemq_conf/activemq.xml", "/srv/activemq/conf/activemq.xml"],
["DIR", "/srv/motech/activemq_data", "/srv/activemq/data"] ["DIR", "/srv/motech/activemq_data", "/srv/activemq/data"]
] ]
}, },