diff options
author | khilman <khilman@users.noreply.github.com> | 2018-01-24 08:58:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 08:58:57 -0800 |
commit | f14d69b382978069321acdec9a434ca85ac137da (patch) | |
tree | 90cdd4df15614ffe022778f986d551a63959712e /lava-master | |
parent | 736fc3248108069d9f7d98fadc436aad3732dfab (diff) | |
parent | c856c35e30f4465f8d14834d672a0dcbf06567fb (diff) |
Merge pull request #13 from montjoie/bugfix
Bugfix
Diffstat (limited to 'lava-master')
-rw-r--r-- | lava-master/Dockerfile | 5 | ||||
-rwxr-xr-x | lava-master/scripts/setup.sh | 9 | ||||
-rw-r--r-- | lava-master/settings.conf | 16 |
3 files changed, 26 insertions, 4 deletions
diff --git a/lava-master/Dockerfile b/lava-master/Dockerfile index 2dd44b0..be8a3b7 100644 --- a/lava-master/Dockerfile +++ b/lava-master/Dockerfile @@ -13,12 +13,14 @@ RUN echo 'lava-server lava-server/instance-name string lava-docker-instance' | && echo 'locales locales/locales_to_be_generated multiselect C.UTF-8 UTF-8, en_US.UTF-8 UTF-8 ' | debconf-set-selections \ && echo 'locales locales/default_environment_locale select en_US.UTF-8' | debconf-set-selections +# e2fsprogs is for libguestfs RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \ locales \ postgresql \ screen \ sudo \ wget \ + e2fsprogs \ gnupg \ vim @@ -78,6 +80,9 @@ RUN /start.sh && /setup.sh && /stop.sh #uncomment if you want to use squid #RUN sed -i 's,^.*http_proxy:.*, http_proxy: http://squid:3128,' /etc/lava-server/env.yaml +#comment this if you do HTTPS (For reenabling CSRF cookie) +COPY settings.conf /etc/lava-server/ + EXPOSE 69/udp 80 3079 5555 5556 CMD /start.sh && bash diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index 011a9c7..b60c93b 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -43,11 +43,12 @@ fi # This directory is used for storing device-types already added mkdir -p /root/.lavadocker/ if [ -e /root/device-types ];then - for i in $(ls /root/device-types/*yaml) + for i in $(ls /root/device-types/*jinja2) do - cp /root/device-types/$i /etc/lava-server/dispatcher-config/device-types/ - devicetype=$(basename $i) - lava-server manage device-types add $devicetype || exit 1 + cp $i /etc/lava-server/dispatcher-config/device-types/ + devicetype=$(basename $i |sed 's,.jinja2,,') + echo "Adding custom $devicetype" + lava-server manage device-types add $devicetype || exit $? touch /root/.lavadocker/devicetype-$devicetype done fi diff --git a/lava-master/settings.conf b/lava-master/settings.conf new file mode 100644 index 0000000..c809e2c --- /dev/null +++ b/lava-master/settings.conf @@ -0,0 +1,16 @@ +{ + "DEBUG": false, + "STATICFILES_DIRS": [ + ["lava-server", "/usr/share/pyshared/lava_server/htdocs/"] + ], + "MEDIA_ROOT": "/var/lib/lava-server/default/media", + "ARCHIVE_ROOT": "/var/lib/lava-server/default/archive", + "STATIC_ROOT": "/usr/share/lava-server/static", + "STATIC_URL": "/static/", + "MOUNT_POINT": "/", + "HTTPS_XML_RPC": false, + "LOGIN_URL": "/accounts/login/", + "LOGIN_REDIRECT_URL": "/", + "CSRF_COOKIE_SECURE": false, + "SESSION_COOKIE_SECURE": false +} |