Merge branch 'master' of github.com:rosti-cz/runtime
This commit is contained in:
commit
a430efbbe0
@ -20,7 +20,7 @@ imagemagick libmagickwand-dev ncdu \
|
|||||||
libcurl4-openssl-dev python3 python3-pip python3-virtualenv \
|
libcurl4-openssl-dev python3 python3-pip python3-virtualenv \
|
||||||
libcurl4-openssl-dev python-dev libproj-dev gdal-bin libmemcached-dev swig mutt \
|
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 \
|
imagemagick ffmpeg libyaml-dev libc-client2007e-dev libonig-dev libkrb5-dev dialog \
|
||||||
whiptail tmux
|
whiptail tmux rsync nmap
|
||||||
|
|
||||||
WORKDIR /srv
|
WORKDIR /srv
|
||||||
|
|
||||||
|
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -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.
|
2
Makefile
2
Makefile
@ -4,12 +4,14 @@ VERSION=2020.04-1
|
|||||||
all: build
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
$(DOCKER) pull debian:buster
|
||||||
$(DOCKER) build -t rosti/runtime:dev .
|
$(DOCKER) build -t rosti/runtime:dev .
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
DOCKER=$(DOCKER) ./tests.sh
|
DOCKER=$(DOCKER) ./tests.sh
|
||||||
|
|
||||||
squashed:
|
squashed:
|
||||||
|
$(DOCKER) pull debian:buster
|
||||||
$(DOCKER) build --squash -t rosti/runtime:dev-squashed .
|
$(DOCKER) build --squash -t rosti/runtime:dev-squashed .
|
||||||
|
|
||||||
push: squashed
|
push: squashed
|
||||||
|
@ -61,9 +61,15 @@ cd php-$VERSION
|
|||||||
--enable-opcache \
|
--enable-opcache \
|
||||||
--with-imap \
|
--with-imap \
|
||||||
--with-imap-ssl \
|
--with-imap-ssl \
|
||||||
--with-kerberos
|
--with-kerberos \
|
||||||
|
--with-soapclient \
|
||||||
|
--with-pear
|
||||||
make -j
|
make -j
|
||||||
make install
|
make install
|
||||||
|
|
||||||
mkdir -p /opt/techs/php-$VERSION/etc/conf.d/
|
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
|
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
|
||||||
|
2
rosti.sh
2
rosti.sh
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ~/.bashrc
|
||||||
|
|
||||||
WIDTH=180
|
WIDTH=180
|
||||||
HEIGHT=25
|
HEIGHT=25
|
||||||
|
|
||||||
|
18
tests.sh
18
tests.sh
@ -20,7 +20,7 @@ function stop() {
|
|||||||
|
|
||||||
# Default page
|
# Default page
|
||||||
run
|
run
|
||||||
$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "<title>Roští.cz</title>" > /dev/null
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "<title>Roští.cz</title>" > /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT default response correct"
|
echo "$I/$COUNT default response correct"
|
||||||
else
|
else
|
||||||
@ -36,9 +36,9 @@ stop
|
|||||||
# Node.js 12.14.1
|
# Node.js 12.14.1
|
||||||
run
|
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
|
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
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Node.js 12.14.1 response correct"
|
echo "$I/$COUNT Node.js 12.14.1 response correct"
|
||||||
else
|
else
|
||||||
@ -53,9 +53,9 @@ stop
|
|||||||
# Node.js 13.7.0
|
# Node.js 13.7.0
|
||||||
run
|
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
|
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
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Node.js 13.7.0 response correct"
|
echo "$I/$COUNT Node.js 13.7.0 response correct"
|
||||||
else
|
else
|
||||||
@ -71,9 +71,9 @@ stop
|
|||||||
# Python 3.8.2
|
# Python 3.8.2
|
||||||
run
|
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
|
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
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Python 3.8.1 response correct"
|
echo "$I/$COUNT Python 3.8.1 response correct"
|
||||||
else
|
else
|
||||||
@ -88,9 +88,9 @@ stop
|
|||||||
# PHP 7.4.2
|
# PHP 7.4.2
|
||||||
run
|
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
|
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
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT PHP 7.4.2 response correct"
|
echo "$I/$COUNT PHP 7.4.2 response correct"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user