diff --git a/Dockerfile b/Dockerfile index a6ceda0..03adca1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ imagemagick libmagickwand-dev ncdu \ libcurl4-openssl-dev python3 python3-pip python3-virtualenv \ libcurl4-openssl-dev python-dev libproj-dev gdal-bin libmemcached-dev swig mutt \ imagemagick ffmpeg libyaml-dev libc-client2007e-dev libonig-dev libkrb5-dev dialog \ -whiptail tmux +whiptail tmux rsync nmap WORKDIR /srv diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d2867b9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020, Rošti.cz, s.r.o. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile b/Makefile index c662312..6b7258c 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,14 @@ VERSION=2020.04-1 all: build build: + $(DOCKER) pull debian:buster $(DOCKER) build -t rosti/runtime:dev . test: build DOCKER=$(DOCKER) ./tests.sh squashed: + $(DOCKER) pull debian:buster $(DOCKER) build --squash -t rosti/runtime:dev-squashed . push: squashed diff --git a/build_php.sh b/build_php.sh index eb1283c..fe4c335 100755 --- a/build_php.sh +++ b/build_php.sh @@ -61,9 +61,15 @@ cd php-$VERSION --enable-opcache \ --with-imap \ --with-imap-ssl \ - --with-kerberos + --with-kerberos \ + --with-soapclient \ + --with-pear make -j make install mkdir -p /opt/techs/php-$VERSION/etc/conf.d/ ln -s /srv/conf/php-fpm/php.ini /opt/techs/php-$VERSION/etc/conf.d/app.ini + +echo "no" | /opt/techs/php-$VERSION/bin/pecl install redis + +echo "extension=redis.so" > /opt/techs/php-$VERSION/etc/conf.d/extensions.ini diff --git a/rosti.sh b/rosti.sh index 3a6035f..e09e88e 100755 --- a/rosti.sh +++ b/rosti.sh @@ -1,5 +1,7 @@ #!/bin/bash +. ~/.bashrc + WIDTH=180 HEIGHT=25 diff --git a/tests.sh b/tests.sh index adc236b..378ac84 100755 --- a/tests.sh +++ b/tests.sh @@ -20,7 +20,7 @@ function stop() { # Default page run -$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "Roští.cz" > /dev/null +$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "Roští.cz" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT default response correct" else @@ -36,9 +36,9 @@ stop # Node.js 12.14.1 run -$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null sleep 3 -$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null +$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Node.js 12.14.1 response correct" else @@ -53,9 +53,9 @@ stop # Node.js 13.7.0 run -$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null sleep 3 -$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null +$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Node.js 13.7.0 response correct" else @@ -71,9 +71,9 @@ stop # Python 3.8.2 run -$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null sleep 5 -$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null +$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Python 3.8.1 response correct" else @@ -88,9 +88,9 @@ stop # PHP 7.4.2 run -$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null sleep 5 -$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null +$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT PHP 7.4.2 response correct" else