This reverts commit 0d72546a4c. The
extended glob matched when the _entire_ value was numeric, whereas
the pattern matches if it _starts_ with a number.
Fixes: #433Fixes: #435
If DISABLE_HTTPS was set, puppet would run twice, unnecessarily. Move
the `zulip.conf` and subsequent Puppet application to be grouped with
the others; this requires moving that above the nginx configuration,
as it tweaks puppet-controlled nginx files.
Puppet writes the current DNS servers into nginx's config, which may
vary each time the image starts up, depending on the network it is
attached to. We can either write custom logic to mirror Puppet's
behaviour, or just always run Puppet.
This returns the manual steps for upgrading PostgreSQL which were
removed in cd348fb093, and documents the steps required to move a
docker-compose deploy to using Docker-managed volumes.
Docker-managed volumes[^1] are more cross-platform compatible than
hard-coded paths, and will work even if the Docker user cannot write
to the arbitrary path of `/opt/docker/zulip` on the Docker host.
[^1]: https://docs.docker.com/storage/volumes/
Co-authored-by: Alex Vandiver <alexmv@zulip.com>
With previous `%D` format preventable errors like
```
tar (child): /data/backups/backup-09/05/22-03-22-03.tar.gz: Cannot open: No such file or directory
```
will occur. Let's use a more sane[^1] date format where possible.
The -I flag to date(1) was added in roughly 1999[^2] and is portable across
GNU coreutils and BusyBox. Piping to tr(1) to remove colons in filenames
is largely a Windows-compatibility concern, as Win32 does not allow for
that character in filenames[^3], and it's possible that the backups target
directory could be a volume mount to a Windows host (for example on
Docker Desktop For Windows).
[^1]: https://xkcd.com/1179/
[^2]: https://unix.stackexchange.com/a/164834
[^3]: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
Co-Authored-By: Josh Klar <josh@zulip.com>
`restart:` was previously inconsistently provided to service definitions
(only memcached and rabbitmq) and at that, the restart policy was
`always`. `always` can lead to surprising behavior where restarts of the
docker daemon will resurrect explicitly-stopped containers, whereas
`unless-stopped` will leave explicitly-stopped containers stopped.
Set all services in the docker-compose file to `restart:
unless-stopped`.
Further reading: https://linuxhandbook.com/docker-restart-policy/