Set PATH in lxc-build
This commit is contained in:
parent
0fda481317
commit
367deb0897
@ -41,4 +41,4 @@ VOLUME /etc/ssl/services.pem etc/ssl/services.pem
|
||||
VOLUME /srv/ckan-datapusher/conf etc/ckan-datapusher
|
||||
VOLUME /srv/ckan-datapusher/data srv/ckan-datapusher/data
|
||||
|
||||
CMD /bin/execlineb -P /run
|
||||
CMD execlineb -P /run
|
||||
|
@ -55,4 +55,4 @@ MOUNT /srv/ckan/conf etc/ckan
|
||||
MOUNT /srv/ckan/data srv/ckan/storage
|
||||
|
||||
USER 8003 8003
|
||||
CMD /usr/bin/paster serve /etc/ckan/ckan.ini
|
||||
CMD paster serve /etc/ckan/ckan.ini
|
||||
|
@ -15,7 +15,7 @@ export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64)
|
||||
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||
|
||||
# Configure CKAN Solr core
|
||||
lxc-attach -u 8983 -g 8983 solr -- /usr/bin/solr create -p 8983 -c ckan
|
||||
lxc-attach -u 8983 -g 8983 solr -- solr create -p 8983 -c ckan
|
||||
cp ${SOURCE_DIR}/srv/solr/data/ckan/conf/schema.xml /srv/solr/data/ckan/conf/schema.xml
|
||||
cp ${SOURCE_DIR}/srv/solr/data/ckan/conf/solrconfig.xml /srv/solr/data/ckan/conf/solrconfig.xml
|
||||
chown 8983:8983 /srv/solr/data/ckan/conf/schema.xml
|
||||
@ -35,18 +35,18 @@ if [ ${DEBUG:-0} -eq 0 ]; then
|
||||
fi
|
||||
|
||||
# Populate database
|
||||
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 -u 5432 -g 5432 postgres -- /usr/bin/psql
|
||||
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 | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||
|
||||
# Create admin account
|
||||
export CKAN_ADMIN_USER="admin"
|
||||
export CKAN_ADMIN_UUID=$(cat /proc/sys/kernel/random/uuid)
|
||||
export CKAN_ADMIN_APIKEY=$(cat /proc/sys/kernel/random/uuid)
|
||||
export CKAN_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||
export CKAN_ADMIN_HASH=$(lxc-execute ckan -- /usr/bin/python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${CKAN_ADMIN_PWD}')")
|
||||
export CKAN_ADMIN_HASH=$(lxc-execute ckan -- python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${CKAN_ADMIN_PWD}')")
|
||||
export CKAN_ADMIN_EMAIL="admin@example.com"
|
||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- /usr/bin/psql ckan
|
||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql ckan
|
||||
vmmgr update-login ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}"
|
||||
|
||||
# Install cron job
|
||||
|
@ -46,4 +46,4 @@ MOUNT /srv/cts/conf srv/cts/cts/settings
|
||||
|
||||
ENV DJANGO_SETTINGS_MODULE cts.settings.spotter
|
||||
WORKDIR /srv/cts
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -29,4 +29,4 @@ COPY lxc
|
||||
|
||||
MOUNT /srv/frontlinesms/data srv/frontlinesms/.frontlinesms2
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -50,7 +50,7 @@ EOF
|
||||
MOUNT /srv/gnuhealth/conf srv/gnuhealth/gnuhealth/tryton/server/config
|
||||
|
||||
USER 8008 8008
|
||||
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.15/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
ENV TRYTOND_CONFIG /srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf
|
||||
ENV PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.15:/srv/gnuhealth/gnuhealth/tryton/server/config
|
||||
CMD trytond --verbose
|
||||
|
@ -46,4 +46,4 @@ COPY lxc
|
||||
MOUNT /srv/kanboard/data srv/kanboard/data/files
|
||||
MOUNT /srv/kanboard/conf/config.php srv/kanboard/config.php
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -19,4 +19,4 @@ MOUNT /srv/mariadb/conf etc/mysql
|
||||
MOUNT /srv/mariadb/data var/lib/mysql
|
||||
|
||||
USER 3306 3306
|
||||
CMD /usr/bin/mysqld
|
||||
CMD mysqld
|
||||
|
@ -6,7 +6,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
|
||||
# Create MariaDB instance
|
||||
mkdir -p /srv/mariadb/conf /srv/mariadb/data
|
||||
chown 3306:3306 /srv/mariadb/data
|
||||
lxc-execute mariadb -- /usr/bin/mysql_install_db --user=mysql
|
||||
lxc-execute mariadb -- mysql_install_db --user=mysql
|
||||
|
||||
# Configure MariaDB
|
||||
cp ${SOURCE_DIR}/srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf
|
||||
@ -22,5 +22,5 @@ rc-update -u
|
||||
|
||||
# Configure MariaDB admin
|
||||
service mariadb start
|
||||
cat ${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- /usr/bin/mysql
|
||||
cat ${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql
|
||||
service mariadb stop
|
||||
|
@ -44,4 +44,4 @@ MOUNT /srv/mifosx/conf/context.xml srv/tomcat/webapps/fineract-provider/META-INF
|
||||
|
||||
USER 8012 8012
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
||||
CMD catalina.sh run
|
||||
|
@ -28,4 +28,4 @@ MOUNT /srv/motech/conf srv/tomcat/.motech
|
||||
|
||||
USER 8013 8013
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
||||
CMD catalina.sh run
|
||||
|
@ -43,4 +43,4 @@ COPY lxc
|
||||
MOUNT /etc/ssl/services.pem usr/local/share/ca-certificates/services.crt
|
||||
MOUNT /srv/opendatakit-build/conf/config.yml srv/opendatakit-build/config.yml
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -36,4 +36,4 @@ MOUNT /srv/opendatakit/conf/security.properties srv/tomcat/webapps/ROOT/WEB-INF/
|
||||
|
||||
USER 8015 8015
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
||||
CMD catalina.sh run
|
||||
|
@ -41,4 +41,5 @@ MOUNT /srv/openmapkit/data srv/openmapkit/data
|
||||
|
||||
USER 8007 8007
|
||||
ENV NODE_ENV production
|
||||
CMD /usr/bin/node /srv/openmapkit/server.js
|
||||
WORKDIR /srv/openmapkit
|
||||
CMD node server.js
|
||||
|
@ -94,4 +94,4 @@ MOUNT /srv/pandora/conf srv/pandora/conf
|
||||
MOUNT /srv/pandora/data srv/pandora/data
|
||||
|
||||
WORKDIR /srv/pandora
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -21,4 +21,4 @@ EOF
|
||||
MOUNT /srv/postgres/data var/lib/postgresql
|
||||
|
||||
USER 5432 5432
|
||||
CMD /usr/bin/postgres -D /var/lib/postgresql
|
||||
CMD postgres -D /var/lib/postgresql
|
||||
|
@ -7,7 +7,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
|
||||
mkdir -p /srv/postgres/data
|
||||
chown -R 5432:5432 /srv/postgres/data
|
||||
chmod 700 /srv/postgres/data
|
||||
lxc-execute -n postgres -- /usr/bin/initdb -D /var/lib/postgresql
|
||||
lxc-execute -n postgres -- initdb -D /var/lib/postgresql
|
||||
|
||||
# Configure Postgres
|
||||
cp ${SOURCE_DIR}/srv/postgres/data/postgresql.conf /srv/postgres/data/postgresql.conf
|
||||
|
@ -18,4 +18,4 @@ MOUNT /srv/rabbitmq/data var/lib/rabbitmq/mnesia
|
||||
|
||||
USER 5672 5672
|
||||
ENV HOME /usr/lib/rabbitmq
|
||||
CMD /usr/sbin/rabbitmq-server
|
||||
CMD rabbitmq-server
|
||||
|
@ -15,4 +15,4 @@ MOUNT /srv/redis/conf/redis.conf etc/redis.conf
|
||||
MOUNT /srv/redis/data var/lib/redis
|
||||
|
||||
USER 6379 6379
|
||||
CMD /usr/bin/redis-server /etc/redis.conf
|
||||
CMD redis-server /etc/redis.conf
|
||||
|
@ -64,4 +64,4 @@ MOUNT /srv/sahana/data/Spotter srv/web2py/applications/eden/modules/templates/Sp
|
||||
MOUNT /srv/sahana/data/databases srv/web2py/applications/eden/databases
|
||||
MOUNT /srv/sahana/data/uploads srv/web2py/applications/eden/uploads
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -48,4 +48,4 @@ EOF
|
||||
MOUNT /srv/seeddms/conf srv/seeddms/conf
|
||||
MOUNT /srv/seeddms/data srv/seeddms/data
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -34,4 +34,4 @@ MOUNT /srv/sigmah/conf/sigmah.properties srv/tomcat/webapps/sigmah/WEB-INF/class
|
||||
|
||||
USER 8011 8011
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
||||
CMD catalina.sh run
|
||||
|
@ -26,4 +26,4 @@ COPY lxc
|
||||
MOUNT /srv/solr/data var/lib/solr
|
||||
|
||||
USER 8983 8983
|
||||
CMD /usr/bin/solr start -f
|
||||
CMD solr start -f
|
||||
|
@ -37,4 +37,4 @@ MOUNT /srv/ushahidi/conf/env srv/ushahidi/platform/.env
|
||||
MOUNT /srv/ushahidi/conf/config.json srv/ushahidi/config.json
|
||||
MOUNT /srv/ushahidi/data srv/ushahidi/platform/application/media/uploads
|
||||
|
||||
CMD /bin/s6-svscan /etc/services.d
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
@ -30,6 +30,7 @@ lxc.init.gid = {gid}
|
||||
lxc.init.cwd = {cwd}
|
||||
|
||||
# Environment
|
||||
lxc.environment = PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||
{env}
|
||||
|
||||
# Halt
|
||||
|
Loading…
Reference in New Issue
Block a user