Mount only currently customized Decidim configs, resolves #501 for new installations

This commit is contained in:
Disassembler 2021-02-06 13:49:55 +01:00
parent db26467d0b
commit 723a6a494f
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,8 @@
"decidim-postgres" "decidim-postgres"
], ],
"mounts": { "mounts": {
"decidim/decidim_conf": "srv/decidim-app/config", "decidim/decidim_conf/application.yml": "srv/decidim-app/config/application.yml:file",
"decidim/decidim_conf/initializers/decidim.yml": "srv/decidim-app/config/initializers/decidim.yml:file",
"decidim/decidim_data/migrate": "srv/decidim-app/db/migrate", "decidim/decidim_data/migrate": "srv/decidim-app/db/migrate",
"decidim/decidim_data/storage": "srv/decidim-app/storage", "decidim/decidim_data/storage": "srv/decidim-app/storage",
"decidim/decidim_data/uploads": "srv/decidim-app/public/uploads" "decidim/decidim_data/uploads": "srv/decidim-app/public/uploads"

View File

@ -5,7 +5,6 @@ set -ev
POSTGRES_DATA="${VOLUMES_DIR}/decidim/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/decidim/postgres_data"
DECIDIM_CONF="${VOLUMES_DIR}/decidim/decidim_conf" DECIDIM_CONF="${VOLUMES_DIR}/decidim/decidim_conf"
DECIDIM_DATA="${VOLUMES_DIR}/decidim/decidim_data" DECIDIM_DATA="${VOLUMES_DIR}/decidim/decidim_data"
DECIDIM_LAYER="${LAYERS_DIR}/decidim_0.23.1-210130"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -20,10 +19,9 @@ export DECIDIM_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
spoc-container start decidim-postgres spoc-container start decidim-postgres
envsubst <createdb.sql | spoc-container exec decidim-postgres -- psql envsubst <createdb.sql | spoc-container exec decidim-postgres -- psql
# Copy existing config files into persistent storage
cp -rp ${DECIDIM_LAYER}/srv/decidim-app/config ${DECIDIM_CONF}
# Configure Decidim # Configure Decidim
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_CONF}
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_CONF}/initializers
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/migrate install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/migrate
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/storage install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/storage
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/uploads install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/uploads