Fix SeedDMS install

This commit is contained in:
Disassembler 2019-12-10 18:56:15 +01:00
parent ed997ab417
commit 19b62a4370
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -11,6 +11,10 @@ lxc-execute -n seeddms-postgres -- initdb -D /var/lib/postgresql
cp postgres_data/postgresql.conf /srv/seeddms/postgres_data/postgresql.conf cp postgres_data/postgresql.conf /srv/seeddms/postgres_data/postgresql.conf
cp postgres_data/pg_hba.conf /srv/seeddms/postgres_data/pg_hba.conf cp postgres_data/pg_hba.conf /srv/seeddms/postgres_data/pg_hba.conf
# Copy existing files into persistent storage
lxchelper extract seeddms /srv/seeddms/conf /srv/seeddms/seeddms_conf
lxchelper extract seeddms /srv/seeddms/data /srv/seeddms/seeddms_data
# Populate database # Populate database
export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service lxc-seeddms-postgres start service lxc-seeddms-postgres start
@ -18,10 +22,6 @@ envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql
lxc-execute seeddms -- cat /srv/seeddms/create_tables-postgres.sql | lxc-attach seeddms-postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms" lxc-execute seeddms -- cat /srv/seeddms/create_tables-postgres.sql | lxc-attach seeddms-postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms"
cat custom.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql seeddms cat custom.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql seeddms
# Copy existing files into persistent storage
lxchelper extract seeddms /srv/seeddms/conf /srv/seeddms/seeddms_conf
lxchelper extract seeddms /srv/seeddms/data /srv/seeddms/seeddms_data
# Configure SeedDMS # Configure SeedDMS
envsubst <seeddms_conf/settings.xml >/srv/seeddms/seeddms_conf/settings.xml envsubst <seeddms_conf/settings.xml >/srv/seeddms/seeddms_conf/settings.xml
export SEEDDMS_ADMIN_USER=admin export SEEDDMS_ADMIN_USER=admin