From 0f5c1d6433ac8007ea8260cf7043b86cb52f88b7 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Mon, 14 Oct 2019 07:59:06 +0200 Subject: [PATCH] Change application users UID/GID to 8080 --- doc/existing/list.md | 48 +++++++++---------- lxc-apps/crisiscleanup/install.sh | 2 +- lxc-apps/crisiscleanup/lxcfile | 6 +-- lxc-apps/cts/install.sh | 2 +- lxc-apps/cts/lxcfile | 4 +- lxc-apps/ecogis/install.sh | 2 +- lxc-apps/ecogis/lxcfile | 4 +- lxc-apps/frontlinesms/install.sh | 2 +- lxc-apps/frontlinesms/lxcfile | 6 +-- lxc-apps/gnuhealth/lxcfile | 6 +-- lxc-apps/kanboard/install.sh | 2 +- lxc-apps/kanboard/lxcfile | 4 +- lxc-apps/mifosx/lxcfile | 4 +- lxc-apps/motech/install.sh | 2 +- lxc-apps/motech/lxcfile | 6 +-- lxc-apps/odoo/install.sh | 2 +- lxc-apps/odoo/lxcfile | 6 +-- lxc-apps/opendatakit/install.sh | 2 +- .../opendatakit/opendatakit-build.lxcfile | 4 +- lxc-apps/opendatakit/opendatakit.lxcfile | 6 +-- lxc-apps/openmapkit/install.sh | 2 +- lxc-apps/openmapkit/lxcfile | 6 +-- lxc-apps/pandora/install.sh | 4 +- lxc-apps/pandora/lxcfile | 6 +-- lxc-apps/sahana-demo/install.sh | 6 +-- lxc-apps/sahana/install.sh | 8 ++-- lxc-apps/sahana/lxcfile | 4 +- lxc-apps/sambro/install.sh | 8 ++-- lxc-apps/seeddms/install.sh | 6 +-- lxc-apps/seeddms/lxcfile | 4 +- lxc-apps/sigmah/install.sh | 4 +- lxc-apps/sigmah/lxcfile | 6 +-- lxc-apps/ushahidi/install.sh | 2 +- lxc-apps/ushahidi/lxcfile | 4 +- 34 files changed, 95 insertions(+), 95 deletions(-) diff --git a/doc/existing/list.md b/doc/existing/list.md index f72519e..c731d7b 100644 --- a/doc/existing/list.md +++ b/doc/existing/list.md @@ -24,7 +24,7 @@ | Service | Container | UID/GID | Internal Port | |-----------------|-----------------|---------|------------------| | ActiveMQ | activemq | 61616 | 61616 (ActiveMQ) | -| CKAN Datapusher | ckan-datapusher | 8004 | 8080 (HTTP) | +| CKAN Datapusher | ckan-datapusher | 8080 | 8080 (HTTP) | | MariaDB | mariadb | 3306 | 3306 (MySQL) | | Postgres | postgres | 5432 | 5432 (Postgres) | | RabbitMQ | rabbitmq | 5672 | 5672 (AMQP) | @@ -33,27 +33,27 @@ ## List of application containers -All application containers listen on internal port 8080 (HTTP) +All application containers have the application user UID/GID 8080 and listen on internal port 8080 (HTTP) -| Application | Container | UID/GID | Host | -|----------------|-------------------|---------|-------------| -| CKAN | ckan | 8003 | ckan | -| Crisis Cleanup | crisiscleanup | 8005 | cc | -| CTS | cts | 8006 | cts | -| EcoGIS | ecogis | 8020 | ecogis | -| FrontlineSMS | frontlinesms | 8018 | sms | -| GNU Health | gnuhealth | 8008 | gh | -| KanBoard | kanboard | 8009 | kb | -| Mifos X | mifosx | 8012 | mifosx | -| Motech | motech | 8013 | motech | -| ODK Aggregate | opendatakit | 8015 | odk | -| ODK Build | opendatakit-build | 8017 | odkbuild | -| Odoo | odoo | 8019 | odoo | -| OpenMapKit | openmapkit | 8007 | omk | -| Pan.do/ra | pandora | 8002 | pandora | -| Sahana | sahana | 8001 | sahana | -| Sahana - Demo | sahana-demo | 8001 | sahana-demo | -| SAMBRO | sambro | 8001 | sambro | -| SeedDMS | seeddms | 8010 | dms | -| Sigmah | sigmah | 8011 | sigmah | -| Ushahidi | ushahidi | 8014 | ush | +| Application | Container | Host | +|----------------|-------------------|-------------| +| CKAN | ckan | ckan | +| Crisis Cleanup | crisiscleanup | cc | +| CTS | cts | cts | +| EcoGIS | ecogis | ecogis | +| FrontlineSMS | frontlinesms | sms | +| GNU Health | gnuhealth | gh | +| KanBoard | kanboard | kb | +| Mifos X | mifosx | mifosx | +| Motech | motech | motech | +| ODK Aggregate | opendatakit | odk | +| ODK Build | opendatakit-build | odkbuild | +| Odoo | odoo | odoo | +| OpenMapKit | openmapkit | omk | +| Pan.do/ra | pandora | pandora | +| Sahana | sahana | sahana | +| Sahana - Demo | sahana-demo | sahana-demo | +| SAMBRO | sambro | sambro | +| SeedDMS | seeddms | dms | +| Sigmah | sigmah | sigmah | +| Ushahidi | ushahidi | ush | diff --git a/lxc-apps/crisiscleanup/install.sh b/lxc-apps/crisiscleanup/install.sh index aa6d6b4..92e4e00 100755 --- a/lxc-apps/crisiscleanup/install.sh +++ b/lxc-apps/crisiscleanup/install.sh @@ -20,7 +20,7 @@ envsubst /srv/ecogis/conf/config.php -chown -R 108020:108020 /srv/ecogis/ecogis_conf /srv/ecogis/ecogis_data +chown -R 108080:108080 /srv/ecogis/ecogis_conf /srv/ecogis/ecogis_data # Stop services required for setup service ecogis-postgres stop diff --git a/lxc-apps/ecogis/lxcfile b/lxc-apps/ecogis/lxcfile index 20fa0b5..692f084 100644 --- a/lxc-apps/ecogis/lxcfile +++ b/lxc-apps/ecogis/lxcfile @@ -23,8 +23,8 @@ RUN EOF pear install Auth Log # Create OS user - addgroup -S -g 8020 ecogis - adduser -S -u 8020 -h /srv/ecogis -s /bin/false -g ecogis -G ecogis ecogis + addgroup -S -g 8080 ecogis + adduser -S -u 8080 -h /srv/ecogis -s /bin/false -g ecogis -G ecogis ecogis # Cleanup apk --no-cache del .deps diff --git a/lxc-apps/frontlinesms/install.sh b/lxc-apps/frontlinesms/install.sh index 94b2086..969b28f 100755 --- a/lxc-apps/frontlinesms/install.sh +++ b/lxc-apps/frontlinesms/install.sh @@ -10,7 +10,7 @@ export FRONTLINESMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export FRONTLINESMS_ADMIN_USER_HASH=$(echo -n "${FRONTLINESMS_ADMIN_USER}" | base64) export FRONTLINESMS_ADMIN_PWD_HASH=$(echo -n "${FRONTLINESMS_ADMIN_PWD}" | base64) envsubst /srv/frontlinesms/flsms_data/app-settings.properties -chown -R 8018:8018 /srv/frontlinesms/flsms_data +chown -R 8080:8080 /srv/frontlinesms/flsms_data # Register application vmmgr register-app frontlinesms sms "${FRONTLINESMS_ADMIN_USER}" "${FRONTLINESMS_ADMIN_PWD}" diff --git a/lxc-apps/frontlinesms/lxcfile b/lxc-apps/frontlinesms/lxcfile index ab5aa65..35a0818 100644 --- a/lxc-apps/frontlinesms/lxcfile +++ b/lxc-apps/frontlinesms/lxcfile @@ -8,8 +8,8 @@ RUN EOF apk --no-cache add openjdk8-jre ttf-opensans xf86-video-dummy xorg-server # Create OS user - addgroup -S -g 8018 sms - adduser -S -u 8018 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms + addgroup -S -g 8080 sms + adduser -S -u 8080 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms adduser sms dialout # Install FrontlineSMS @@ -35,7 +35,7 @@ RUN EOF MD5=$(md5sum frontlinesms-core_messages_cs.js | cut -d' ' -f1) cp frontlinesms-core_messages_cs.js frontlinesms-core_messages_cs-${MD5}.js cp frontlinesms-core_messages_cs.js.gz frontlinesms-core_messages_cs-${MD5}.js.gz - chown 8018:8018 frontlinesms-core_messages_cs* + chown 8080:8080 frontlinesms-core_messages_cs* EOF CMD s6-svscan /etc/services.d diff --git a/lxc-apps/gnuhealth/lxcfile b/lxc-apps/gnuhealth/lxcfile index cf2634e..cde9b09 100644 --- a/lxc-apps/gnuhealth/lxcfile +++ b/lxc-apps/gnuhealth/lxcfile @@ -25,8 +25,8 @@ RUN EOF git clone -b 4.6 --single-branch --depth 1 https://github.com/tryton/sao /srv/gnuhealth/sao # Create OS user - addgroup -S -g 8008 gnuhealth - adduser -S -u 8008 -h /srv/gnuhealth -s /bin/bash -g gnuhealth -G gnuhealth gnuhealth + addgroup -S -g 8080 gnuhealth + adduser -S -u 8080 -h /srv/gnuhealth -s /bin/bash -g gnuhealth -G gnuhealth gnuhealth chown -R gnuhealth:gnuhealth /srv/gnuhealth # Install GNU Health @@ -61,5 +61,5 @@ ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-current/bin:/usr/local/s ENV TRYTOND_CONFIG /srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf ENV PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-current:/srv/gnuhealth/gnuhealth/tryton/server/config -USER 8008 8008 +USER 8080 8080 CMD trytond --verbose diff --git a/lxc-apps/kanboard/install.sh b/lxc-apps/kanboard/install.sh index ad5fb85..b13abe3 100755 --- a/lxc-apps/kanboard/install.sh +++ b/lxc-apps/kanboard/install.sh @@ -21,7 +21,7 @@ lxc-execute kanboard -- cat /srv/kanboard/app/Schema/Sql/postgres.sql | lxc-atta # Configure Kanboard mkdir -p /srv/kanboard/kanboard_conf /srv/kanboard/kanboard_data -chown -R 8009:8009 /srv/kanboard/kanboard_data +chown -R 8080:8080 /srv/kanboard/kanboard_data envsubst /srv/kanboard/kanboard_conf/config.php export KANBOARD_ADMIN_USER=admin export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') diff --git a/lxc-apps/kanboard/lxcfile b/lxc-apps/kanboard/lxcfile index 3574e0c..45f7870 100644 --- a/lxc-apps/kanboard/lxcfile +++ b/lxc-apps/kanboard/lxcfile @@ -32,8 +32,8 @@ RUN EOF git clone --depth=1 https://github.com/xavividal/kanboard-plugin-relationgraph /srv/kanboard/plugins/Relationgraph # Create OS user - addgroup -S -g 8009 kanboard - adduser -S -u 8009 -h /srv/kanboard -s /bin/false -g kanboard -G kanboard kanboard + addgroup -S -g 8080 kanboard + adduser -S -u 8080 -h /srv/kanboard -s /bin/false -g kanboard -G kanboard kanboard # Cleanup apk --no-cache del .deps diff --git a/lxc-apps/mifosx/lxcfile b/lxc-apps/mifosx/lxcfile index e51d98d..cdd15e8 100644 --- a/lxc-apps/mifosx/lxcfile +++ b/lxc-apps/mifosx/lxcfile @@ -20,8 +20,8 @@ RUN EOF wget http://central.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.4/drizzle-jdbc-1.4.jar -O /srv/tomcat/lib/drizzle-jdbc-1.4.jar # Create OS user - addgroup -S -g 8012 mifosx - adduser -S -u 8012 -h /srv/tomcat -s /bin/false -g mifosx -G mifosx mifosx + addgroup -S -g 8080 mifosx + adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g mifosx -G mifosx mifosx chown -R mifosx:mifosx /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work # Cleanup diff --git a/lxc-apps/motech/install.sh b/lxc-apps/motech/install.sh index 74b36dc..f44f984 100755 --- a/lxc-apps/motech/install.sh +++ b/lxc-apps/motech/install.sh @@ -28,7 +28,7 @@ envsubst /srv/motech/motech_conf/confi cp motech_conf/config-locations.properties /srv/motech/motech_conf/config-locations.properties cp motech_conf/config/motech-settings.properties /srv/motech/motech_conf/config/motech-settings.properties cp motech_conf/config/org.motechproject.motech-platform-email/motech-email.properties /srv/motech/motech_conf/config/org.motechproject.motech-platform-email/motech-email.properties -chown -R 108013:108013 /srv/motech/motech_conf +chown -R 108080:108080 /srv/motech/motech_conf # Populate database and create admin account service activemq start diff --git a/lxc-apps/motech/lxcfile b/lxc-apps/motech/lxcfile index c697026..bbf3728 100644 --- a/lxc-apps/motech/lxcfile +++ b/lxc-apps/motech/lxcfile @@ -16,14 +16,14 @@ RUN EOF cp /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.5.jar /srv/tomcat/webapps/ROOT/WEB-INF/bundles/postgresql-42.2.5.jar # Create OS user - addgroup -S -g 8013 motech - adduser -S -u 8013 -h /srv/tomcat -s /bin/false -g motech -G motech motech + addgroup -S -g 8080 motech + adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g motech -G motech motech chown -R motech:motech /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work # Cleanup rm -f /tmp/motech.war EOF -USER 8013 8013 +USER 8080 8080 WORKDIR /srv/tomcat CMD catalina.sh run diff --git a/lxc-apps/odoo/install.sh b/lxc-apps/odoo/install.sh index 40da869..3971251 100755 --- a/lxc-apps/odoo/install.sh +++ b/lxc-apps/odoo/install.sh @@ -23,7 +23,7 @@ export ODOO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') mkdir -p /srv/odoo/odoo_conf/ /srv/odoo/odoo_data/ envsubst /srv/odoo/odoo_conf/odoo.conf chown 100000:100000 /srv/odoo/odoo_conf/ -chown 108019:108019 /srv/odoo/odoo_data/ +chown 108080:108080 /srv/odoo/odoo_data/ # Populate database # TODO: proc ne execute? diff --git a/lxc-apps/odoo/lxcfile b/lxc-apps/odoo/lxcfile index dc6da9c..58e2146 100644 --- a/lxc-apps/odoo/lxcfile +++ b/lxc-apps/odoo/lxcfile @@ -21,8 +21,8 @@ RUN EOF pip3 install -r requirements.txt # Create OS user - addgroup -S -g 8019 odoo - adduser -S -u 8019 -h /srv/odoo -s /bin/false -g odoo -G odoo odoo + addgroup -S -g 8080 odoo + adduser -S -u 8080 -h /srv/odoo -s /bin/false -g odoo -G odoo odoo chown -R odoo:odoo /srv/odoo # Cleanup @@ -31,5 +31,5 @@ RUN EOF rm -rf /usr/local/share/.cache EOF -USER 8019 8019 +USER 8080 8080 CMD /srv/odoo/odoo-bin -c srv/odoo/odoo.conf diff --git a/lxc-apps/opendatakit/install.sh b/lxc-apps/opendatakit/install.sh index 63f9f08..5def99e 100755 --- a/lxc-apps/opendatakit/install.sh +++ b/lxc-apps/opendatakit/install.sh @@ -26,7 +26,7 @@ export OPENDATAKIT_ADMIN_REALM=spotter envsubst /srv/opendatakit/odk_conf/jdbc.properties envsubst /srv/opendatakit/odk_conf/security.properties cp odk_conf/server.xml /srv/opendatakit/odk_conf/server.xml -chown -R 108015:108015 /srv/opendatakit/odk_conf +chown -R 108080:108080 /srv/opendatakit/odk_conf # Configure OpenDataKit Build export OPENDATAKITBUILD_COOKIE_SECRET=$(head -c 8 /dev/urandom | hexdump -e '"%x"') diff --git a/lxc-apps/opendatakit/opendatakit-build.lxcfile b/lxc-apps/opendatakit/opendatakit-build.lxcfile index b818d42..492e6d9 100644 --- a/lxc-apps/opendatakit/opendatakit-build.lxcfile +++ b/lxc-apps/opendatakit/opendatakit-build.lxcfile @@ -27,8 +27,8 @@ RUN EOF make # Create OS user - addgroup -S -g 8017 odkbuild - adduser -S -u 8017 -h /srv/opendatakit-build -s /bin/false -g odkbuild -G odkbuild odkbuild + addgroup -S -g 8080 odkbuild + adduser -S -u 8080 -h /srv/opendatakit-build -s /bin/false -g odkbuild -G odkbuild odkbuild chown -R odkbuild:odkbuild /srv/opendatakit-build chown -R odkbuild:odkbuild /srv/build2xlsform diff --git a/lxc-apps/opendatakit/opendatakit.lxcfile b/lxc-apps/opendatakit/opendatakit.lxcfile index e2dbf69..931c494 100644 --- a/lxc-apps/opendatakit/opendatakit.lxcfile +++ b/lxc-apps/opendatakit/opendatakit.lxcfile @@ -15,14 +15,14 @@ RUN EOF wget https://jdbc.postgresql.org/download/postgresql-42.2.5.jar -O /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.5.jar # Create OS user - addgroup -S -g 8015 odk - adduser -S -u 8015 -h /srv/tomcat -s /bin/false -g odk -G odk odk + addgroup -S -g 8080 odk + adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g odk -G odk odk chown -R odk:odk /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work # Cleanup rm /tmp/odk.war EOF -USER 8015 8015 +USER 8080 8080 WORKDIR /srv/tomcat CMD catalina.sh run diff --git a/lxc-apps/openmapkit/install.sh b/lxc-apps/openmapkit/install.sh index 1b0900e..5964b39 100755 --- a/lxc-apps/openmapkit/install.sh +++ b/lxc-apps/openmapkit/install.sh @@ -7,7 +7,7 @@ cd $(realpath $(dirname "${0}"))/install export OPENMAPKIT_ADMIN_USER="admin" export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') mkdir -p /srv/openmapkit/omk_conf /srv/openmapkit/omk_data -chown -R 108007:108007 /srv/openmapkit/omk_data +chown -R 108080:108080 /srv/openmapkit/omk_data lxc-execute openmapkit -- tar -cC /srv/openmapkit/data . | tar -xC /srv/openmapkit/omk_data envsubst /srv/openmapkit/omk_conf/settings.js diff --git a/lxc-apps/openmapkit/lxcfile b/lxc-apps/openmapkit/lxcfile index 859a09d..563fd12 100644 --- a/lxc-apps/openmapkit/lxcfile +++ b/lxc-apps/openmapkit/lxcfile @@ -14,7 +14,7 @@ RUN EOF # Clone OpenMapKit git clone --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit cd /srv/openmapkit - git submodule update --init + git submodule update --init #TODO: Why does this fail? # Install OpenMapKit dependencies pip install -r requirements.txt @@ -25,8 +25,8 @@ RUN EOF yarn build # Create OS user - addgroup -S -g 8007 omk - adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk + addgroup -S -g 8080 omk + adduser -S -u 8080 -h /srv/openmapkit -s /bin/false -g omk -G omk omk chown -R omk:omk /srv/openmapkit # Cleanup diff --git a/lxc-apps/pandora/install.sh b/lxc-apps/pandora/install.sh index 4d20831..1a4484c 100755 --- a/lxc-apps/pandora/install.sh +++ b/lxc-apps/pandora/install.sh @@ -31,7 +31,7 @@ lxc-attach pandora-rabbitmq -- rabbitmqctl set_permissions -p /pandora pandora " # Configure Pandora mkdir -p /srv/pandora/pandora_conf /srv/pandora/pandora_data -chown 108002:108002 /srv/pandora/pandora_data +chown 108080:108080 /srv/pandora/pandora_data # Copy customized configuration if VANILLA environment variable is not set, else use the default pandora config if [ ${VANILLA:-0} -eq 0 ]; then cp pandora_conf/config.jsonc /srv/pandora/pandora_conf/config.jsonc @@ -40,7 +40,7 @@ else fi cp pandora_conf/gunicorn_config.py /srv/pandora/pandora_conf/gunicorn_config.py envsubst /srv/pandora/pandora_conf/local_settings.py -chown -R 108002:108002 /srv/pandora/pandora_conf +chown -R 108080:108080 /srv/pandora/pandora_conf # Populate database lxc-execute pandora -- /srv/pandora/pandora/manage.py migrate --noinput diff --git a/lxc-apps/pandora/lxcfile b/lxc-apps/pandora/lxcfile index 14f9d9e..3f757e3 100644 --- a/lxc-apps/pandora/lxcfile +++ b/lxc-apps/pandora/lxcfile @@ -59,8 +59,8 @@ RUN EOF ./manage.py collectstatic -l --noinput # Create OS user - addgroup -S -g 8002 pandora - adduser -S -u 8002 -h /srv/pandora -s /bin/false -g pandora -G pandora pandora + addgroup -S -g 8080 pandora + adduser -S -u 8080 -h /srv/pandora -s /bin/false -g pandora -G pandora pandora EOF COPY lxc @@ -80,7 +80,7 @@ RUN EOF ln -s /srv/pandora/conf/config.jsonc config.jsonc ln -s /srv/pandora/conf/gunicorn_config.py gunicorn_config.py ln -s /srv/pandora/conf/local_settings.py local_settings.py - chown -R 8002:8002 /srv/pandora + chown -R 8080:8080 /srv/pandora # Cleanup apk --no-cache del .deps diff --git a/lxc-apps/sahana-demo/install.sh b/lxc-apps/sahana-demo/install.sh index 8a1db26..9b3d42d 100755 --- a/lxc-apps/sahana-demo/install.sh +++ b/lxc-apps/sahana-demo/install.sh @@ -20,7 +20,7 @@ envsubst /srv/sahana-demo/sahana_conf/000_config.py envsubst /srv/sahana-demo/sahana_data/default/users/masterUsers.csv -chown -R 108001:108001 /srv/sahana/sahana_conf /srv/sahana/sahana_data +chown -R 108080:108080 /srv/sahana/sahana_conf /srv/sahana/sahana_data # Populate database -lxc-execute -u 8001 -g 8001 sahana-demo -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' +lxc-execute -u 8080 -g 8080 sahana-demo -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' # Install config update script cp update-conf.sh /srv/sahana-demo/update-conf.sh diff --git a/lxc-apps/sahana/install.sh b/lxc-apps/sahana/install.sh index 7bc335c..6f0ae05 100755 --- a/lxc-apps/sahana/install.sh +++ b/lxc-apps/sahana/install.sh @@ -20,12 +20,12 @@ envsubst /srv/sahana/sahana_conf/000_config.py envsubst /srv/sahana/sahana_data/Spotter/masterUsers.csv cp sahana_conf/00_settings.py /srv/sahana/sahana_conf/00_settings.py -chown -R 108001:108001 /srv/sahana/sahana_conf /srv/sahana/sahana_data +chown -R 108080:108080 /srv/sahana/sahana_conf /srv/sahana/sahana_data # Populate database -lxc-execute -u 8001 -g 8001 sahana -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' +lxc-execute -u 8080 -g 8080 sahana -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' # Set "production values" (increases performance) only if the DEBUG environment variable is not set if [ ${DEBUG:-0} -eq 0 ]; then diff --git a/lxc-apps/sahana/lxcfile b/lxc-apps/sahana/lxcfile index 9d0df85..fba0ac2 100644 --- a/lxc-apps/sahana/lxcfile +++ b/lxc-apps/sahana/lxcfile @@ -44,8 +44,8 @@ COPY lxc RUN EOF # Create OS user - addgroup -S -g 8001 sahana - adduser -S -u 8001 -h /srv/web2py -s /bin/false -g sahana -G sahana sahana + addgroup -S -g 8080 sahana + adduser -S -u 8080 -h /srv/web2py -s /bin/false -g sahana -G sahana sahana chown -R sahana:sahana /srv/web2py # Cleanup diff --git a/lxc-apps/sambro/install.sh b/lxc-apps/sambro/install.sh index 42520ad..6fa21f7 100755 --- a/lxc-apps/sambro/install.sh +++ b/lxc-apps/sambro/install.sh @@ -20,7 +20,7 @@ envsubst /srv/sambro/sahana_conf/000_config.py # TODO: #mkdir -p /var/lib/lxc/sambro/sambro/srv/web2py/applications/eden/modules/templates/default/users #envsubst /var/lib/lxc/sambro/sambro/srv/web2py/applications/eden/modules/templates/default/users/masterUsers.csv -#chown -R 8001:8001 /var/lib/lxc/sambro/sambro/srv/web2py +#chown -R 8080:8080 /var/lib/lxc/sambro/sambro/srv/web2py cp sahana_conf/00_settings.py /srv/sambro/sahana_conf/00_settings.py cp sahana_data/SAMBRO/config.py /srv/sambro/sahana_data/SAMBRO/config.py -chown -R 108001:108001 /srv/sambro/sahana_conf /srv/sambro/sahana_data +chown -R 108080:108080 /srv/sambro/sahana_conf /srv/sambro/sahana_data # Populate database -lxc-execute -u 8001 -g 8001 sambro -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' +lxc-execute -u 8080 -g 8080 sambro -- sh -c 'cd /srv/web2py; ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py' # Set "production values" (increases performance) only if the DEBUG environment variable is not set if [ ${DEBUG:-0} -eq 0 ]; then diff --git a/lxc-apps/seeddms/install.sh b/lxc-apps/seeddms/install.sh index d0087d2..b77c141 100755 --- a/lxc-apps/seeddms/install.sh +++ b/lxc-apps/seeddms/install.sh @@ -22,8 +22,8 @@ cat custom.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql seeddms # Copy existing files into persistent storage mkdir -p /srv/seeddms/seeddms_conf /srv/seeddms/seeddms)data -chown 108010:108010 /srv/seeddms/conf -chown 108010:108010 /srv/seeddms/data +chown 108080:108080 /srv/seeddms/conf +chown 108080:108080 /srv/seeddms/data lxc-execute seeddms -- tar -cC /srv/seeddms/conf . | tar -xC /srv/seeddms/seeddms_conf lxc-execute seeddms -- tar -cC /srv/seeddms/data . | tar -xC /srv/seeddms/seeddms_data @@ -33,7 +33,7 @@ export SEEDDMS_ADMIN_USER=admin export SEEDDMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export SEEDDMS_ADMIN_EMAIL=admin@example.com envsubst /srv/sigmah/sigmah_conf/persistence.xml cp sigmah_conf/sigmah.properties /srv/sigmah/sigmah_conf/sigmah.properties -chown -R 108011:108011 /srv/sigmah/sigmah_conf +chown -R 108080:108080 /srv/sigmah/sigmah_conf lxc-execute sigmah -- cat /srv/tomcat/webapps/sigmah/sigmah/images/header/org-default-logo.png >/srv/sigmah/sigmah_data/files/logo.png # Populate database diff --git a/lxc-apps/sigmah/lxcfile b/lxc-apps/sigmah/lxcfile index ab397ec..15692a2 100644 --- a/lxc-apps/sigmah/lxcfile +++ b/lxc-apps/sigmah/lxcfile @@ -18,8 +18,8 @@ RUN EOF rm /srv/tomcat/webapps/sigmah/WEB-INF/classes/logback.xml # Create OS user - addgroup -S -g 8011 sigmah - adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah + addgroup -S -g 8080 sigmah + adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah chown -R sigmah:sigmah /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work # Download database files @@ -32,6 +32,6 @@ EOF COPY lxc -USER 8011 8011 +USER 8080 8080 WORKDIR /srv/tomcat CMD catalina.sh run diff --git a/lxc-apps/ushahidi/install.sh b/lxc-apps/ushahidi/install.sh index bce9df2..ae68bca 100755 --- a/lxc-apps/ushahidi/install.sh +++ b/lxc-apps/ushahidi/install.sh @@ -17,7 +17,7 @@ envsubst /srv/ushahidi/ushahidi_conf/env cp ushahidi_conf/config.json /srv/ushahidi/ushahidi_conf/config.json chown -R 100000:100000 /srv/ushahidi/ushahidi_conf diff --git a/lxc-apps/ushahidi/lxcfile b/lxc-apps/ushahidi/lxcfile index 3100047..4f36744 100644 --- a/lxc-apps/ushahidi/lxcfile +++ b/lxc-apps/ushahidi/lxcfile @@ -16,8 +16,8 @@ RUN EOF mv /srv/ushahidi/ushahidi-platform-bundle-v3.12.3 /srv/ushahidi/platform # Create OS user - addgroup -S -g 8014 ushahidi - adduser -S -u 8014 -h /srv/ushahidi -s /bin/false -g ushahidi -G ushahidi ushahidi + addgroup -S -g 8080 ushahidi + adduser -S -u 8080 -h /srv/ushahidi -s /bin/false -g ushahidi -G ushahidi ushahidi chown -R ushahidi:ushahidi /srv/ushahidi/platform/application/logs /srv/ushahidi/platform/application/cache /srv/ushahidi/platform/application/media/uploads # Cleanup