Spotter-VM/lxc-apps/ckan/lxcfile

58 lines
2.1 KiB
Plaintext
Raw Normal View History

IMAGE ckan 2.8.2-190620
META title CKAN
META desc-cs Datový sklad
META desc-en Data store
META type app
META license GPL
META depends ckan-datapusher postgres redis solr
LAYER alpine3.9 3.9.4-190620
LAYER alpine3.9-python2.7 2.7.16-190620
2018-09-05 17:41:38 +02:00
2018-09-12 16:08:10 +02:00
RUN EOF
2018-09-05 17:41:38 +02:00
# Install runtime dependencies
2019-06-05 09:33:28 +02:00
apk --no-cache add geos@vm libjpeg-turbo libmagic libpq mailcap py2-pip zlib
2018-09-05 17:41:38 +02:00
# Install build dependencies
apk --no-cache add --virtual .deps build-base git libjpeg-turbo-dev libxml2-dev libxslt-dev postgresql-dev python2-dev zlib-dev
# Hackfix for python find_library('c') call
ln -s /lib/ld-musl-x86_64.so.1 /lib/libc.so.1
# Install CKAN
mkdir -p /srv/ckan
cd /srv/ckan
pip install -U setuptools
pip install flask-debugtoolbar
pip install -e 'git+https://github.com/ckan/ckan.git#egg=ckan'
pip install -r /srv/ckan/src/ckan/requirements.txt
# Install CKAN extensions
pip install -e 'git+https://github.com/ckan/ckanext-basiccharts#egg=ckanext_basiccharts'
pip install -e 'git+https://github.com/ckan/ckanext-spatial#egg=ckanext_spatial'
pip install -e 'git+https://github.com/ckan/ckanext-geoview#egg=ckanext_geoview'
pip install -e 'git+https://github.com/ckan/ckanext-mapviews#egg=ckanext_mapviews'
pip install -e 'git+https://github.com/XVTSolutions/ckanext-spatialUI#egg=ckanext_spatialui'
pip install -e 'git+https://github.com/aptivate/ckanext-datasetthumbnail#egg=ckanext_datasetthumbnail'
pip install -e 'git+https://github.com/datagvat/ckanext-dgvat_xls#egg=ckanext_dgvat_xls'
pip install -r /srv/ckan/src/ckanext-spatial/pip-requirements.txt
pip install -r /srv/ckan/src/ckanext-geoview/pip-requirements.txt
2018-09-05 17:41:38 +02:00
pip install -r /srv/ckan/src/ckanext-dgvat-xls/requirements.txt
# Create OS user
addgroup -S -g 8003 ckan
adduser -S -u 8003 -h /srv/ckan -s /bin/false -g ckan -G ckan ckan
chown -R ckan:ckan /srv/ckan
# Cleanup
apk --no-cache del .deps
find /srv/ckan/src -name '.git*' -exec rm -rf {} +
rm -rf /root/.cache
2018-09-12 16:08:10 +02:00
EOF
2018-09-05 17:41:38 +02:00
2018-09-14 18:13:11 +02:00
MOUNT DIR /srv/ckan/conf etc/ckan
MOUNT DIR /srv/ckan/data srv/ckan/storage
2018-09-05 17:41:38 +02:00
2018-09-07 18:46:30 +02:00
USER 8003 8003
2018-09-13 16:21:16 +02:00
CMD paster serve /etc/ckan/ckan.ini