This updates the default PostgreSQL version to 15.
* image/base: update default postgres version to 15
* launcher: bump base image to include postgres 15
* postgres.template.yml: update default version to 15
* postgres.15.template.yml: current version template
Legacy version templates:
* postgres.13.template.yml
* postgres.12.template.yml
* postgres.10.template.yml
* postgres.9.5.template.yml
- Remove manual database creation, and instead promote discourse user to postgres SUPERUSER. This means that `db:drop` and `db:create` commands can be run in the dev image, just like in other local development environments. As well as simplifying things, it fixes turbo_rspec, which was previously impossible in the docker dev environment (because `discourse` didn't have permissions to create the parallel databases)
- Stop pre-migrating test database in dev image. It adds additional build time & image size, and doesn't actually help because core's `bin/docker/boot_dev` script overwrites the container's postgres directory with a volume mount
This fixes a regression introduced in
bbefa1e5f3. Basically, we cannot configure
the default bundle jobs when building the image because the number of
cores used to build the image can be different from the number of cores
on the machine running the image.
Chrome isn’t available for aarch64 yet, but Chromium (which is basically
the same browser without the proprietary bits from Google) is shipped by
Debian. They also ship a Chrome driver compiled for aarch64.
This patch adds Chromium to our images without removing Chrome on
x86_64, allowing a smooth transition to using Chromium only.
Chrome isn’t available yet for aarch64, but Chromium (which is basically
the same browser without the proprietary bits from Google) is shipped by
Debian. They also ship a Chrome driver compiled for aarch64.
By using Chromium instead of Chrome, we unify how we do things
regardless of the architecture used in the generated image.
This patch adds some new steps to support the aarch64 architecture
on Linux.
An updated version of Rust is needed to compile the `selenium-manager`
binary as it’s not shipped with the `selenium-webdriver` gem yet.
In the same vein, Google doesn’t ship an aarch64 version of Chrome yet,
so it doesn’t make sense to install even Chromium in the image. We have
to rely on Firefox to run the system specs.
Unfortunately there is no way to 'unset' an ENV in a Dockerfile. We were working around this by setting `RAILS_ENV` to an empty string in the discourse_dev dockerfile, but that didn't work in every situation.
The discourse_dev image doesn't rely on anything in the 'release' layer of the base image. In fact, it deletes the entire contents of `/var/www/*`.
This commit resolves the situation by:
- Moving the `RAILS_ENV=production` line to the 'release' layer of the base image
- Updating the discourse_dev image to be based on the 'slim' base image
discourse_dev installs a temporary version of Discourse to create a pre-migrated database. Previously this was installing gems in the global bundler directory, which could lead to permissions errors. This commit makes it use a local vendor directory, just like we do in the production install of Discourse.
Trying to run specs with RAILS_ENV=development ends up like:
```
/usr/local/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.
Randomized with seed 1716
FF
Failures:
1) CategoryBadge escapes HTML in category names / descriptions
Failure/Error: DB.test_transaction = ActiveRecord::Base.connection.current_transaction
NoMethodError:
undefined method `test_transaction=' for #<MiniSqlMultisiteConnection:0x000055a7662ea1e0>
# ./spec/rails_helper.rb:284:in `block (2 levels) in <top (required)>'
# ./spec/rails_helper.rb:277:in `block (2 levels) in <top (required)>'
```
* Ruby 2.6.3 which has a couple of Unicode improvements
* nginx from 1.5.9 to 1.5.12 (http://nginx.org/en/CHANGES)
* ImageMagick 7.0.8-42 and switch it back to using GitHub, because only the latest release is available on the official site and this regularly breaks our build
* libpng from 1.6.36 to 1.6.37 (security fix)
* gifsicle from 1.91 to 1.92 (http://www.lcdf.org/gifsicle/changes.html)
* Node.js v10, the latest active LTS (https://nodejs.org/en/about/releases/)
This fixes the following error during image build:
sane@4.0.2: The engine "node" is incompatible with this module. Expected version "6.* || 8.* || >= 10.*". Got "9.11.2"