This commit is contained in:
meskio 2022-12-19 20:04:44 +01:00
parent 2734427bd9
commit a9d2fb1982
No known key found for this signature in database
GPG Key ID: 52B8F5AC97A2DA86
2 changed files with 43 additions and 3 deletions

View File

@ -2,9 +2,7 @@ version: '2.4'
services:
db:
# TODO: fix our mariadb container
#image: registry.sindominio.net/mariadb
image: mysql
image: registry.sindominio.net/mariadb
user: "$USER_GROUP"
restart: always
volumes:

42
test Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
tear_down () {
docker-compose stop
cd ..
rm -rf tmp
}
mkdir tmp
cp env.sample tmp/.env
cat docker-compose.yml | sed 's/registry.sindominio.net\/wordpress/wordpress/' > tmp/docker-compose.yml
cd tmp
mkdir db uploads
chown 1000:1000 db uploads
docker-compose up -d
# Wait for the web server to respond
cont=0
echo -n "Espera al servidor web "
while ! curl -s localhost:8080 > /dev/null; do
echo -n "."
cont=$((cont+1))
if [ "$cont" == 30 ]; then
echo " no responde"
tear_down
exit 1
fi
sleep 1
done
echo " connectado"
STR=`curl -s localhost:8080 |grep "Hello world!"`
tear_down
if [[ "$STR" == "" ]]
then
echo "No encontre 'Hello world!' en la web del contenedor"
exit 1
fi