Make Sigmah SPOC-compatible, cont'd
This commit is contained in:
parent
ecfafd0c4a
commit
bd70f07f8b
@ -22,6 +22,7 @@ envsubst <createdb.sql | spoc-container exec sigmah-postgres -- psql
|
|||||||
|
|
||||||
# Configure Sigmah
|
# Configure Sigmah
|
||||||
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_CONF}
|
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_CONF}
|
||||||
|
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_DATA}
|
||||||
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_DATA}/files
|
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_DATA}/files
|
||||||
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_DATA}/archives
|
install -o 108080 -g 108080 -m 750 -d ${SIGMAH_DATA}/archives
|
||||||
envsubst <sigmah_conf/persistence.xml | install -o 108080 -g 108080 -m 640 /dev/stdin ${SIGMAH_CONF}/persistence.xml
|
envsubst <sigmah_conf/persistence.xml | install -o 108080 -g 108080 -m 640 /dev/stdin ${SIGMAH_CONF}/persistence.xml
|
||||||
@ -33,17 +34,16 @@ export SIGMAH_ADMIN_USER=Admin
|
|||||||
export SIGMAH_ADMIN_EMAIL=admin@example.com
|
export SIGMAH_ADMIN_EMAIL=admin@example.com
|
||||||
export SIGMAH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
export SIGMAH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
||||||
export SIGMAH_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${SIGMAH_ADMIN_PWD}'.encode(), bcrypt.gensalt(prefix=b'2a')).decode())")
|
export SIGMAH_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${SIGMAH_ADMIN_PWD}'.encode(), bcrypt.gensalt(prefix=b'2a')).decode())")
|
||||||
spoc-container exec sigmah -- cat /srv/sigmah-MinimumDataKit.sql | spoc-container exec sigmah-postgres -- sh -c "PGPASSWORD=${SIGMAH_PWD} psql -U sigmah sigmah"
|
cat ${SIGMAH_LAYER}/srv/sigmah-MinimumDataKit.sql | spoc-container exec sigmah-postgres -- sh -c "PGPASSWORD=${SIGMAH_PWD} psql -U sigmah sigmah"
|
||||||
spoc-container exec sigmah -- cat /srv/sigmah-newOrganizationLaunchScript.sql | \
|
sed -e "s|§OrganizationName§|Demo organization|g" \
|
||||||
sed -e "s|§OrganizationName§|Demo organization|g" \
|
-e "s|§OrganizationLogoFilename§|logo.png|g" \
|
||||||
-e "s|§OrganizationLogoFilename§|logo.png|g" \
|
-e "s|§HeadquartersCountryCode§|CZ|g" \
|
||||||
-e "s|§HeadquartersCountryCode§|CZ|g" \
|
-e "s|§UserEmail§|${SIGMAH_ADMIN_EMAIL}|g" \
|
||||||
-e "s|§UserEmail§|${SIGMAH_ADMIN_EMAIL}|g" \
|
-e "s|§UserName§|${SIGMAH_ADMIN_USER}|g" \
|
||||||
-e "s|§UserName§|${SIGMAH_ADMIN_USER}|g" \
|
-e "s|§UserFirstName§|${SIGMAH_ADMIN_USER}|g" \
|
||||||
-e "s|§UserFirstName§|${SIGMAH_ADMIN_USER}|g" \
|
-e "s|§UserLocale§|en|g" \
|
||||||
-e "s|§UserLocale§|en|g" \
|
-e "s|\$2a\$10\$pMcTA1p9fefR8U9NoOPei.H0eq/TbbdSF27M0tn9iDWBrA4JHeCDC|${SIGMAH_ADMIN_HASH}|" \
|
||||||
-e "s|\$2a\$10\$pMcTA1p9fefR8U9NoOPei.H0eq/TbbdSF27M0tn9iDWBrA4JHeCDC|${SIGMAH_ADMIN_HASH}|" \
|
${SIGMAH_LAYER}/srv/sigmah-newOrganizationLaunchScript.sql | spoc-container exec sigmah-postgres -- sh -c "PGPASSWORD=${SIGMAH_PWD} psql -U sigmah sigmah"
|
||||||
| spoc-container exec sigmah-postgres -- sh -c "PGPASSWORD=${SIGMAH_PWD} psql -U sigmah sigmah"
|
|
||||||
|
|
||||||
# Stop services required for setup
|
# Stop services required for setup
|
||||||
spoc-container stop sigmah-postgres
|
spoc-container stop sigmah-postgres
|
||||||
|
Loading…
Reference in New Issue
Block a user