Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paulo Roberto Pereira da Silva
Script Customization Zammad
Commits
cef41020
Commit
cef41020
authored
Nov 10, 2022
by
Paulo Pereira
Browse files
fix: ajusta o comando para recuperar o id do container postgresql
parent
f6a09baf
Changes
1
Hide whitespace changes
Inline
Side-by-side
layout-customization/layout-std-customization.sh
View file @
cef41020
...
...
@@ -2,14 +2,14 @@
CONTAINER_RAILSSERVER_ID
=
$(
docker ps |
grep
railsserver |
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
postgres
ql_1
|
awk
'{print $1}'
)
if
[
-z
"
$CONTAINER_RAILSSERVER_ID
"
]
then
echo
"Rails Container is not running"
else
echo
"[INCREASING MAX CONNECTIONS POSTGRESQL...]
$(
date
)
"
docker
exec
$CONTAINER_POSTGRESQL_ID
ba
sh
-c
"sed -i '/max_connections/c
\m
ax_connections = 2000' /var/lib/postgresql/data/postgresql.conf"
docker
exec
-u
root
$CONTAINER_POSTGRESQL_ID
/bin/
sh
-c
"sed -i '/max_connections/c
\m
ax_connections = 2000' /var/lib/postgresql/data/postgresql.conf"
docker restart
$CONTAINER_POSTGRESQL_ID
sleep
10
...
...
@@ -24,7 +24,7 @@ else
cp
customized-files/custom.css
$BASE_DIR_ZAMMAD
/app/assets/stylesheets/custom/custom.css
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
)
"
docker
exec
$CONTAINER_RAILSSERVER_ID
rake assets:precompile
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment