archive
This commit is contained in:
15
mytinytodo/build_and_run.sh
Executable file
15
mytinytodo/build_and_run.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#! /bin/bash
|
||||
|
||||
img="php"
|
||||
tag="7.1.26-alpine3.9"
|
||||
docker pull $img:$tag
|
||||
|
||||
cp $PWD/entrypoint.sh $PWD/mnt/entrypoint.sh
|
||||
|
||||
docker run --rm -it \
|
||||
--entrypoint sh \
|
||||
--name ${img##*/} \
|
||||
-p 8345:8080 \
|
||||
-v $(pwd)/mnt:/mnt \
|
||||
$img:$tag \
|
||||
/mnt/entrypoint.sh
|
||||
28
mytinytodo/entrypoint.sh
Executable file
28
mytinytodo/entrypoint.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#! /bin/sh
|
||||
|
||||
cd /mnt
|
||||
|
||||
apk add --no-cache \
|
||||
ca-certificates \
|
||||
bash \
|
||||
git
|
||||
|
||||
#if [ ! -d ./mytinytodo ]; then
|
||||
if [ ! -d ./mytinytodo2 ]; then
|
||||
#wget https://bitbucket.org/maxpozdeev/mytinytodo/downloads/mytinytodo-v1.4.3.zip
|
||||
#unzip mytinytodo-v1.4.3.zip
|
||||
git clone https://github.com/ptrckkk/myTinyTodo.git mytinytodo2
|
||||
fi
|
||||
|
||||
if [ -z "$(grep invert ./mytinytodo2/themes/default/style.css)" ]; then
|
||||
echo '
|
||||
body {
|
||||
filter: invert(80%);
|
||||
background-color: #222;
|
||||
}
|
||||
' | tr '\n' ' ' >> ./mytinytodo2/themes/default/style.css
|
||||
fi
|
||||
|
||||
#cd mytinytodo
|
||||
cd mytinytodo2
|
||||
php -S 0.0.0.0:8080
|
||||
23
mytinytodo/mnt/entrypoint.sh
Executable file
23
mytinytodo/mnt/entrypoint.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
cd /mnt
|
||||
|
||||
apk add --no-cache \
|
||||
ca-certificates \
|
||||
bash \
|
||||
git
|
||||
|
||||
#if [ ! -d ./mytinytodo ]; then
|
||||
if [ ! -d ./mytinytodo2 ]; then
|
||||
#wget https://bitbucket.org/maxpozdeev/mytinytodo/downloads/mytinytodo-v1.4.3.zip
|
||||
#unzip mytinytodo-v1.4.3.zip
|
||||
git clone https://github.com/ptrckkk/myTinyTodo.git mytinytodo2
|
||||
fi
|
||||
|
||||
if [ -z "$(grep invert ./mytinytodo2/themes/default/style.css)" ]; then
|
||||
echo 'body { filter: invert(80%); background-color: #222; }' >> ./mytinytodo2/themes/default/style.css
|
||||
fi
|
||||
|
||||
#cd mytinytodo
|
||||
cd mytinytodo2
|
||||
php -S 0.0.0.0:8080
|
||||
Reference in New Issue
Block a user