Hackfix CKAN support for PostgreSQL 12
This commit is contained in:
parent
0b46076ae7
commit
c7b0ea28b2
@ -28,6 +28,10 @@ RUN EOF
|
|||||||
pip install -r /srv/ckan/src/ckanext-geoview/pip-requirements.txt
|
pip install -r /srv/ckan/src/ckanext-geoview/pip-requirements.txt
|
||||||
pip install -r /srv/ckan/src/ckanext-dgvat-xls/requirements.txt
|
pip install -r /srv/ckan/src/ckanext-dgvat-xls/requirements.txt
|
||||||
|
|
||||||
|
# Hackfix support for PostgreSQL 12
|
||||||
|
# https://github.com/sqlalchemy/sqlalchemy/issues/4463
|
||||||
|
sed -i 's/cons\.consrc/pg_get_constraintdef(cons.oid)/' /usr/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py
|
||||||
|
|
||||||
# Create OS user
|
# Create OS user
|
||||||
addgroup -S -g 8080 ckan
|
addgroup -S -g 8080 ckan
|
||||||
adduser -S -u 8080 -h /srv/ckan -s /bin/false -g ckan -G ckan ckan
|
adduser -S -u 8080 -h /srv/ckan -s /bin/false -g ckan -G ckan ckan
|
||||||
|
@ -67,7 +67,7 @@ chown -R 108080:108080 ${CKAN_DATA}
|
|||||||
# Populate database
|
# Populate database
|
||||||
spoc-container exec ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini
|
spoc-container exec ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini
|
||||||
spoc-container exec ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
|
spoc-container exec ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
|
||||||
spoc-container exec ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -u 5432 -g 5432 ckan-postgres -- psql
|
spoc-container exec ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | spoc-container exec ckan-postgres -- psql
|
||||||
|
|
||||||
# Create admin account
|
# Create admin account
|
||||||
export CKAN_ADMIN_USER="admin"
|
export CKAN_ADMIN_USER="admin"
|
||||||
|
Loading…
Reference in New Issue
Block a user