Commit cef41020 authored by Paulo Pereira's avatar Paulo Pereira
Browse files

fix: ajusta o comando para recuperar o id do container postgresql

parent f6a09baf
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
CONTAINER_RAILSSERVER_ID=$(docker ps | grep railsserver | awk '{print $1}') CONTAINER_RAILSSERVER_ID=$(docker ps | grep railsserver | awk '{print $1}')
CONTAINER_NGINX_ID=$(docker ps | grep nginx | awk '{print $1}') CONTAINER_NGINX_ID=$(docker ps | grep nginx | awk '{print $1}')
CONTAINER_POSTGRESQL_ID=$(docker ps | grep postgres | awk '{print $1}') CONTAINER_POSTGRESQL_ID=$(docker ps | grep postgresql_1 | awk '{print $1}')
if [ -z "$CONTAINER_RAILSSERVER_ID" ] if [ -z "$CONTAINER_RAILSSERVER_ID" ]
then then
echo "Rails Container is not running" echo "Rails Container is not running"
else else
echo "[INCREASING MAX CONNECTIONS POSTGRESQL...] $(date)" echo "[INCREASING MAX CONNECTIONS POSTGRESQL...] $(date)"
docker exec $CONTAINER_POSTGRESQL_ID bash -c "sed -i '/max_connections/c\max_connections = 2000' /var/lib/postgresql/data/postgresql.conf" docker exec -u root $CONTAINER_POSTGRESQL_ID /bin/sh -c "sed -i '/max_connections/c\max_connections = 2000' /var/lib/postgresql/data/postgresql.conf"
docker restart $CONTAINER_POSTGRESQL_ID docker restart $CONTAINER_POSTGRESQL_ID
sleep 10 sleep 10
...@@ -24,7 +24,7 @@ else ...@@ -24,7 +24,7 @@ else
cp customized-files/custom.css $BASE_DIR_ZAMMAD/app/assets/stylesheets/custom/custom.css cp customized-files/custom.css $BASE_DIR_ZAMMAD/app/assets/stylesheets/custom/custom.css
echo "[INSTALLING NODEJS...] $(date)" echo "[INSTALLING NODEJS...] $(date)"
docker exec -u root $CONTAINER_RAILSSERVER_ID bash -c "apt update && apt install -y nodejs" docker exec -u root $CONTAINER_RAILSSERVER_ID bash -c "apt-get update && apt-get install -y nodejs"
echo "[COMPILING ASSETS...] $(date)" echo "[COMPILING ASSETS...] $(date)"
docker exec $CONTAINER_RAILSSERVER_ID rake assets:precompile docker exec $CONTAINER_RAILSSERVER_ID rake assets:precompile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment