mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-04 22:13:31 +00:00
Fixes to the process_fts_updates
Added nginx.conf for supervisord
This commit is contained in:
@@ -20,6 +20,22 @@ rabbitmqSetup(){
|
|||||||
rabbitmqctl set_permissions -p / zulip '.*' '.*' '.*' || :
|
rabbitmqctl set_permissions -p / zulip '.*' '.*' '.*' || :
|
||||||
}
|
}
|
||||||
databaseSetup(){
|
databaseSetup(){
|
||||||
|
if [ -z "$DB_HOST" ]; then
|
||||||
|
echo "No DB_HOST given."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [ -z "$DB_NAME" ]; then
|
||||||
|
echo "No DB_NAME given."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [ -z "$DB_USER" ]; then
|
||||||
|
echo "No DB_USER given."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [ -z "$DB_PASSWORD" ]; then
|
||||||
|
echo "No DB_PASSWORD given."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
cat >> "$ZULIP_ZPROJECT_SETTINGS" <<EOF
|
cat >> "$ZULIP_ZPROJECT_SETTINGS" <<EOF
|
||||||
from zerver.lib.db import TimeTrackingConnection
|
from zerver.lib.db import TimeTrackingConnection
|
||||||
|
|
||||||
@@ -59,6 +75,7 @@ EOF
|
|||||||
echo -n "."
|
echo -n "."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
sed -i "s~psycopg2.connect(\"user=zulip\")~psycopg2.connect(\"host=$DB_HOST port=$DB_PORT dbname=$DB_NAME user=$DB_USER password=$DB_PASSWORD\")~g" "/usr/local/bin/process_fts_updates"
|
||||||
echo """
|
echo """
|
||||||
CREATE USER zulip;
|
CREATE USER zulip;
|
||||||
ALTER ROLE zulip SET search_path TO zulip,public;
|
ALTER ROLE zulip SET search_path TO zulip,public;
|
||||||
|
|||||||
@@ -51,4 +51,3 @@ while True:
|
|||||||
while conn.notifies:
|
while conn.notifies:
|
||||||
conn.notifies.pop()
|
conn.notifies.pop()
|
||||||
update_fts_columns(cursor)
|
update_fts_columns(cursor)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[program:cron]
|
[program:cron]
|
||||||
command = /usr/sbin/cron -f
|
command = /usr/sbin/cron -f
|
||||||
stdout_logfile = /var/log/supervisor/%(program_name)s.log
|
stdout_events_enabled=true
|
||||||
stderr_logfile = /var/log/supervisor/%(program_name)s.log
|
stderr_events_enabled=true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
|
|||||||
5
includes/zulip-puppet/files/supervisor/conf.d/nginx.conf
Normal file
5
includes/zulip-puppet/files/supervisor/conf.d/nginx.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[program:cron]
|
||||||
|
command = /usr/sbin/nginx
|
||||||
|
stdout_events_enabled=true
|
||||||
|
stderr_events_enabled=true
|
||||||
|
autorestart = true
|
||||||
@@ -30,4 +30,12 @@ class zulip::nginx {
|
|||||||
file { "/etc/nginx/sites-enabled/default":
|
file { "/etc/nginx/sites-enabled/default":
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
}
|
}
|
||||||
|
file { "/etc/supervisor/conf.d/nginx.conf":
|
||||||
|
require => Package[supervisor],
|
||||||
|
ensure => file,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
mode => 644,
|
||||||
|
source => "puppet:///modules/zulip/supervisor/conf.d/nginx.conf",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user