Skip to content

Commit

Permalink
Fix SSH non-zero exit status error
Browse files Browse the repository at this point in the history
  • Loading branch information
amin-ous committed Nov 13, 2022
1 parent 13784f3 commit e7517bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions vagrant/provision/once-as-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ echo "Configuring Docker for Grafana"
if [[ ! -e /etc/docker/daemon.json ]]; then
touch /etc/docker/daemon.json
echo "{" >> /etc/docker/daemon.json
echo " \"metrics-addr\" : \"0.0.0.0:9090\"," >> /etc/docker/daemon.json
echo " \"metrics-addr\" : \"0.0.0.0:9323\"," >> /etc/docker/daemon.json
echo " \"experimental\" : true" >> /etc/docker/daemon.json
echo "}" >> /etc/docker/daemon.json
fi
sudo systemctl restart docker
systemctl restart docker

echo "Configuring Prometheus..."
if [[ ! -e /etc/prometheus/prometheus.yml ]]; then
Expand Down Expand Up @@ -146,8 +146,8 @@ echo "Installing Ngrok..."
cd /usr/local/bin && tar xf /usr/tmp/ngrok-v3-stable-linux-amd64.tgz

echo "Starting backend containers..."
if [ ! "$(cd /app/shopgular-backend && docker compose ps -a)" ]; then
docker compose build && docker compose up -d && docker restart portainer > /dev/null 2>&1
if [ ! "$(docker ps -a | grep "shopgular-backend")" ]; then
cd /app/shopgular-backend && docker compose build && docker compose up -d && docker restart portainer > /dev/null 2>&1
fi

echo "Installing Nginx..."
Expand All @@ -157,6 +157,6 @@ echo "Starting Nginx..."
systemctl start nginx && systemctl enable nginx

echo "Starting frontend containers..."
if [ ! "$(cd /app/shopgular-frontend && docker compose ps -a)" ]; then
docker compose build && docker compose up -d
if [ ! "$(docker ps -a | grep "shopgular-frontend")" ]; then
cd /app/shopgular-frontend && docker compose build && docker compose up -d
fi
4 changes: 2 additions & 2 deletions vagrant/provision/once-as-vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ echo "Enabling colorized prompt for guest console..."

echo "Configuring Grafana..."
curl 'http://admin:admin@localhost:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary \
'{"name":"Jenkins: Performance and Health Overview","type":"prometheus","url":"http://192.168.56.1:9090","access":"proxy","isDefault":true,"jsonData":{"httpMethod":"POST"}}'
'{"name":"Jenkins: Performance and Health Overview","type":"prometheus","url":"http://192.168.56.1:9090","access":"proxy","isDefault":true,"jsonData":{"httpMethod":"POST"}}' > /dev/null 2>&1
curl 'http://admin:admin@localhost:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary \
'{"name":"Docker: Performance and Health Overview","type":"prometheus","url":"http://192.168.56.1:9090","access":"proxy","isDefault":true,"jsonData":{"httpMethod":"POST"}}'
'{"name":"Docker: Performance and Health Overview","type":"prometheus","url":"http://192.168.56.1:9090","access":"proxy","isDefault":true,"jsonData":{"httpMethod":"POST"}}' > /dev/null 2>&1

0 comments on commit e7517bf

Please sign in to comment.