* helper script use container-like launch logic

This commit is contained in:
2021-04-27 16:40:00 +03:00
parent 0609ced666
commit 57ebccad04
4 changed files with 28 additions and 14 deletions

View File

@ -1,3 +1,9 @@
#!/bin/bash
cd $HOME/structure
docker-compose exec web nginx -s reload
CONTAINER=$(docker ps | grep nginx | awk '{print $1}')
if [[ -z "${CONTAINER}" ]]; then
echo "Unable to find container: nginx"
exit 1
fi
docker exec -ti ${CONTAINER} nginx -s reload