Fix CKAN data files ownership, resolves #274

This commit is contained in:
Disassembler 2018-08-14 18:25:20 +02:00
parent 4621dbbade
commit 0926190a70
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -32,7 +32,6 @@ service solr restart
# Configure CKAN
mkdir -p /srv/ckan/conf /srv/ckan/data
chown -R 8003:8003 /srv/ckan/data
export CKAN_SECRET=$(head -c 18 /dev/urandom | base64)
export CKAN_UUID=$(cat /proc/sys/kernel/random/uuid)
envsubst <${SOURCE_DIR}/srv/ckan/conf/ckan.ini >/srv/ckan/conf/ckan.ini
@ -47,6 +46,7 @@ fi
docker run --rm -h ckan --link postgres --link redis --link solr -v /srv/ckan/conf:/etc/ckan -v /srv/ckan/data:/srv/ckan/storage ckan paster --plugin=ckan db init -c /etc/ckan/ckan.ini
docker run --rm -h ckan --link postgres --link redis --link solr -v /srv/ckan/conf:/etc/ckan -v /srv/ckan/data:/srv/ckan/storage ckan paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
docker run --rm -h ckan --link postgres --link redis --link solr -v /srv/ckan/conf:/etc/ckan -v /srv/ckan/data:/srv/ckan/storage ckan paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | docker exec -i postgres psql
chown -R 8003:8003 /srv/ckan/data
# Create admin account
export CKAN_ADMIN_USER="admin"