Skip to content
Snippets Groups Projects
Commit 8ba9dd81 authored by David Schmitz's avatar David Schmitz
Browse files

docker: updated Dockerfile, run script, settings.dist for docker

parent afbb2366
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ FROM debian:stable ...@@ -2,6 +2,7 @@ FROM debian:stable
RUN apt-get -yqq update 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 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 # RUN echo "create database fod;" | mysql -u root
......
...@@ -66,7 +66,8 @@ DATABASES = { ...@@ -66,7 +66,8 @@ DATABASES = {
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems. # although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone. # 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: # Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html # http://www.i18nguy.com/unicode/language-identifiers.html
......
...@@ -3,6 +3,15 @@ ...@@ -3,6 +3,15 @@
export LC_ALL="C" # this will unfortunatelly break ./manage.py createsuperuser as locale string is literally used to derive encoding export LC_ALL="C" # this will unfortunatelly break ./manage.py createsuperuser as locale string is literally used to derive encoding
. /srv/venv/bin/activate . /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 # fix needed to make sure gevent works # may be put into Dockerfile instead
...@@ -20,8 +29,10 @@ cd "$(dirname "$0")" ...@@ -20,8 +29,10 @@ cd "$(dirname "$0")"
echo "Starting services FoD is depending on generically: beanstalkd" 1>&2 echo "Starting services FoD is depending on generically: beanstalkd" 1>&2
service beanstalkd start service beanstalkd start
echo "Starting DB services FoD might be depending on (depending on its config): mysql" 1>&2 if [ ! -x ./fodcli_db_is_mysql ] || ./fodcli_db_is_mysql; then
service mysql start 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) # hook to initiallize (without any user interaction admin user and its peer data)
[ -x ./fodcli_insert_basic_data.sh ] && ./fodcli_insert_basic_data.sh [ -x ./fodcli_insert_basic_data.sh ] && ./fodcli_insert_basic_data.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment