ckan test

This commit is contained in:
Disassembler 2018-09-07 18:46:30 +02:00
parent 354c98bbf0
commit 9b4be311e6
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
7 changed files with 9 additions and 17 deletions

0
activemq/setup.sh Normal file → Executable file
View File

View File

@ -63,7 +63,7 @@ vmmgr create-selfsigned
cp ${SOURCE_DIR}/etc/nginx/nginx.conf /etc/nginx/nginx.conf
# Configure services
for SERVICE in consolefont crond iptables nginx ntpd swap vmmgr; do
for SERVICE in cgroups consolefont crond iptables nginx ntpd swap vmmgr; do
rc-update add ${SERVICE} boot
service ${SERVICE} start
done

View File

@ -1,3 +0,0 @@
#!/bin/sh
/bin/true

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
fdmove -c 2 1
s6-setuidgid 8003:8003
/usr/bin/paster serve /etc/ckan/ckan.ini

View File

@ -47,9 +47,8 @@ SCRIPT
rm -rf /root/.cache
RUN
COPY lxc
MOUNT /srv/ckan/conf etc/ckan
MOUNT /srv/ckan/data srv/ckan/storage
CMD /bin/s6-svscan /etc/services.d
USER 8003 8003
CMD /usr/bin/paster serve /etc/ckan/ckan.ini

View File

@ -11,7 +11,7 @@ service solr start
# Create database
export CKAN_PWD=$(head -c 18 /dev/urandom | base64)
export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach postgres -- /bin/s6-setuidgid 5432:5432 psql
# Configure CKAN Solr core
# TODO lxc-execute solr -- solr create -p 8983 -c ckan
@ -33,10 +33,10 @@ if [ ${DEBUG:-0} -eq 0 ]; then
fi
# Populate database
lxc-execute ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini
lxc-execute ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
lxc-execute ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini # TODO | lxc-attach -n postgres -- psql
chown -R 8003:8003 /srv/ckan/data
lxc-execute ckan -- /usr/bin/paster --plugin=ckan db init -c /etc/ckan/ckan.ini
lxc-execute ckan -- /usr/bin/paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini
lxc-execute ckan -- /usr/bin/paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach postgres -- /bin/s6-setuidgid 5432:5432 psql
chown -R 8003:8003 /srv/ckan/data # TODO: re)move as uid is now correct ?
# Create admin account
export CKAN_ADMIN_USER="admin"

View File

@ -20,6 +20,7 @@ lxc.net.0.ipv4.gateway = auto
lxc.rootfs.path = {rootfs}
# Mounts
lxc.mount.entry = shm dev/shm tmpfs rw,nodev,noexec,nosuid,relatime,mode=1777,create=dir 0 0
lxc.mount.entry = /etc/hosts etc/hosts none bind 0 0
lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind 0 0
{mounts}