zulip/scripts/setup
Alex Vandiver 07bc2f2f5e
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
setup-certbot: Run hooks, instead of "service nginx reload".
`certbot certonly`, when obtaining a new certificate, does not
run deploy hooks that were installed into
`/etc/letsencrypt/renewal-hooks` (certbot/certbot#9978).  Because of
this, we added an explicit `service nginx reload`.

This turns out to be awkward for a few reasons -- firstly, this does
not handle the restarting of our SMTP server, which also needs to pick
up the new certificates.  It requires that Docker installs explicitly
restart nginx their own way.  And it also means that if certbot
already had a certificate, we reload nginx twice.

We would ideally just have certbot just run all of the deploy hooks,
as usual, no matter if the certificate is new or a renewal; however,
it has no flag to do so.

We move to approximating running the deploy hooks, if the certificate
is new.  This makes it easier to have identical behaviour between
initial install and later renewals.

This requires moving the symlinking step itself to a deploy hook, so
it can run before nginx and the email server are restarted.  Our one
consumer of the `--skip-symlink` flag, Docker, can work around its
removal.  The symlink step is a no-op if `$ZULIP_DOMAIN` is unset,
i.e. during automated renewals.  This ensures that system that
installed certbot, but has since changed to manual certificate
management, does not have those certificates overridden next time
certbot renews itself.

(cherry picked from commit 0c953f9870)
2025-11-26 14:18:48 -05:00
..
apt-repos install: Support Debian 13. 2025-08-13 14:11:05 -07:00
__init__.py setup: Add missing __init__.py. 2021-07-05 12:20:39 -07:00
compare-settings-to-template ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
configure-rabbitmq configure-rabbitmq: Restore startup retry loop. 2025-05-15 16:59:27 -07:00
create-database create-database: Skip stop-server and flush-memcached on standalone Pg. 2024-04-04 16:48:58 -07:00
create-db.sql create-db: Default dbuser and dbname to zulip. 2021-05-26 17:19:11 -07:00
create-pgroonga.sql pgroonga: Remove now-unnecessary 'GRANT USAGE' statement. 2023-06-23 14:40:27 -07:00
flush-memcached flush_memcached: Respect DJANGO_SETTINGS_MODULE. 2025-06-25 11:49:02 -07:00
generate_secrets.py settings: Enable Altcha in development if on localhost. 2025-07-25 22:29:51 -07:00
generate-rabbitmq-cookie CVE-2021-43799: Set a secure Erlang cookie. 2022-01-25 02:13:53 +00:00
generate-self-signed-cert generate-self-signed-cert: Remove RANDFILE. 2022-02-25 14:49:07 -08:00
initialize-database checks: Move checkconfig to standard check framework. 2025-11-20 15:38:06 -08:00
install install: Use a period at end of root error message. 2021-06-23 08:42:46 -07:00
pgroonga-config pgroonga: Do not attempt to configure pgroonga without a database. 2023-09-22 11:45:00 -07:00
reindex-textual-data reindex-textual-data: Remove PostgreSQL ≥ 11 check. 2024-11-01 15:33:31 -07:00
restore-backup typos: Fix typos caught by mwic. 2024-05-20 13:55:00 -07:00
setup-certbot setup-certbot: Run hooks, instead of "service nginx reload". 2025-11-26 14:18:48 -05:00
sha256-file-to puppet: Add a sha256_file_to. 2023-02-10 15:53:10 -08:00
sha256-tarball-to sha256-tarball-to: Support zipfiles. 2025-03-27 21:56:54 -07:00
terminate-psql-sessions terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
upgrade-postgresql upgrade-postgresql: Get PostgreSQL version without manage.py shell. 2025-06-11 16:25:25 -07:00