diff --git a/Dockerfile b/Dockerfile index d7e6932088fb6b0826493f3829e2419d149d0a81..cb2c87fa44007e9fc180582a83f734f85c91ae29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM debian:stable RUN apt-get -yqq update RUN apt-get -yqq install virtualenv python python-dev vim git gcc libevent-dev libxml2-dev libxslt-dev patch beanstalkd mariadb-server libmariadb-dev libmariadbclient-dev-compat sqlite3 +RUN apt-get -yqq install procps # RUN echo "create database fod;" | mysql -u root diff --git a/flowspy/settings.py.dist b/flowspy/settings.py.dist index 4a592251ff6eb4846963faac92a8a5477debb04d..4d533337be8983c12e6958d9ae32de5b373cb93e 100644 --- a/flowspy/settings.py.dist +++ b/flowspy/settings.py.dist @@ -66,7 +66,8 @@ DATABASES = { # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # In a Windows environment this must be set to your system time zone. -TIME_ZONE = 'Europe/Athens' +#TIME_ZONE = 'Europe/Athens' +TIME_ZONE = 'UTC' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html diff --git a/runfod.sh b/runfod.sh index 4fe676d711c6c35cb481572f97d263215a74d6e8..6b12fb1803daef650a8ef887a2aa287d7b40636f 100755 --- a/runfod.sh +++ b/runfod.sh @@ -3,6 +3,15 @@ export LC_ALL="C" # this will unfortunatelly break ./manage.py createsuperuser as locale string is literally used to derive encoding . /srv/venv/bin/activate +if [ ! -e /srv/flowspy/pythonenv ]; then + cat > /srv/flowspy/pythonenv <<EOF +#!/bin/bash +. /srv/venv/bin/activate +exec "\$@" +EOF + chmod +x /srv/flowspy/pythonenv +fi + ## # fix needed to make sure gevent works # may be put into Dockerfile instead @@ -20,8 +29,10 @@ cd "$(dirname "$0")" echo "Starting services FoD is depending on generically: beanstalkd" 1>&2 service beanstalkd start -echo "Starting DB services FoD might be depending on (depending on its config): mysql" 1>&2 -service mysql start +if [ ! -x ./fodcli_db_is_mysql ] || ./fodcli_db_is_mysql; then + echo "Starting DB services FoD might be depending on (depending on its config): mysql" 1>&2 + service mysql start +fi # hook to initiallize (without any user interaction admin user and its peer data) [ -x ./fodcli_insert_basic_data.sh ] && ./fodcli_insert_basic_data.sh