Commit Graph

57 Commits

Author SHA1 Message Date
mwaniki-wairungu d9c837c783
FEATURE: Update base image and set default to postgresql 15 (#909)
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
2025-01-29 10:20:49 +03:00
David Taylor 928adfd09f
Suppress pnpm upgrade notices in logs (#866) 2024-09-06 10:28:15 +01:00
David Taylor 87871bc430
Make compatible with pnpm (#854)
Switches behavior based on the presence of `yarn.lock`

See https://github.com/discourse/discourse/pull/28671
2024-09-02 20:55:57 +01:00
Alan Guo Xiang Tan fe48fa2c5c
Switch to `discourse/ruby:3.3.4-bookworm-slim` (#853) 2024-09-02 11:49:43 +08:00
David Taylor 98c5337c12
Warmup yarn and bundle caches in dev image (#832)
Uses a multi-stage build with bind mount to avoid adding the discourse repo itself to the layers
2024-08-20 14:51:32 +01:00
David Taylor 7b0e4b45b5
dev: add user-installed gems to PATH (#833)
This is important for usability of things like discourse_theme, and editor tooling (e.g. ruby-lsp)
2024-08-20 14:51:14 +01:00
David Taylor f1c9d8afb2
DEV: Simplify discourse_dev postgres setup (#830)
- 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
2024-08-19 16:44:23 +01:00
Rafael dos Santos Silva 618ab51850
Update pgvector to 0.7 (#825)
* Update pgvector to 0.7

* escape

* drop version
2024-08-09 11:16:38 -03:00
Alan Guo Xiang Tan 9e253b704c
FIX: Remove `bundle config jobs` (#821)
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.
2024-08-08 11:23:54 +08:00
Loïc Guitaut 961a4a13ca Add Chromium to our images
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.
2024-03-25 11:20:56 +01:00
Alan Guo Xiang Tan 68d150d372
Revert "Use Chromium instead of Chrome (#782)" (#783)
This reverts commit e6ffa64d9d.

We need to fix the various Chrome assumptions in Discourse core.
2024-03-21 07:46:57 +08:00
Loïc Guitaut e6ffa64d9d
Use Chromium instead of Chrome (#782)
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.
2024-03-21 05:48:52 +08:00
Loïc Guitaut 1964d1737a FEATURE: Add early support for aarch64 in dev env
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.
2024-01-30 10:23:57 +01:00
David Taylor 313f86feff
Move `RAILS_ENV` to release image; build discourse_dev from slim (#725)
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
2023-07-26 12:18:10 +01:00
Rafael dos Santos Silva aa9d0a11ed
Enable pgvector in postgres template (#724) 2023-07-13 15:34:12 -03:00
David Taylor 1de36f60ae
Fix permissions error in dev image (#666) 2023-01-10 20:43:35 +00:00
David Taylor e6cb71cd55
discourse_dev: use local bundler directory for temp install (#662)
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.
2023-01-03 17:58:51 +00:00
David Taylor 0a97cd9d8a
FIX: Run `yarn install` when building development image (#638)
The rails app now leans on JS dependencies being present in node_modules
2022-07-13 17:16:26 +01:00
Jarek Radosz 7f253c3d28
FIX: Unset RAILS_ENV to allow running both dev stuff and test (#629)
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)>'

```
2022-05-31 13:01:37 +02:00
Jarek Radosz 7abc94aec8
DEV: Don't install eslint and babel-eslint (#624)
Core has eslint in its dependencies, so there's no need for global eslint as far I can tell.
2022-04-29 12:18:10 +02:00
Arpit Jalan ee061f17a9
DEV: replace mailcatcher with mailhog (#572) 2021-10-08 11:06:32 +05:30
Rafael dos Santos Silva d457b6b9a8 DEV: Also run ember tests in Firefox 2021-08-19 17:00:29 -03:00
Arpit Jalan 60a8de57b2
FIX: perform bundle install after modifying directory permissions (#504) 2020-12-16 23:52:47 +05:30
Rafael dos Santos Silva 8ffba3af73
Fix dev image to work with pg13 (#495) 2020-12-08 15:10:16 -03:00
Rafael dos Santos Silva 14e63b5026
Fix dev image for new pg 2020-05-12 14:46:55 -03:00
Rafael dos Santos Silva b95ea6f77a Revert "Revert "First pass in moving to debian""
This reverts commit 29204e4158.
2019-08-19 15:17:01 -03:00
Rafael dos Santos Silva 29204e4158 Revert "First pass in moving to debian"
This reverts commit 223b69e775.
2019-08-16 18:03:14 -03:00
Rafael dos Santos Silva 223b69e775 First pass in moving to debian 2019-08-16 14:57:36 -03:00
Guo Xiang Tan b9175b877b Set the right RAILS_ENV for other base images.
Follow up to c2c7a3d8f3.
2019-05-03 12:52:31 +08:00
Gerhard Schlager ff9ddabe38 Update dependencies (#429)
* 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/)
2019-04-27 18:08:16 +10:00
Gerhard Schlager 2da30c242f Upgrade node to v10 for test and dev
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"
2019-01-15 17:33:33 +01:00
Guo Xiang Tan 1bea87f4c2 Fix discourse_dev base image to work with PG 10. 2018-04-04 15:46:33 +08:00
Guo Xiang Tan 161ff5fcc0 Install yarn and node 9 for discourse_dev. 2017-12-21 01:05:01 +08:00
Guo Xiang Tan 14ee3d268d Just install chrome in `discourse_dev` seperately. 2017-12-19 17:49:55 +08:00
Guo Xiang Tan 30a599622f Fix base image for `discourse_dev`. 2017-12-19 16:51:03 +08:00
Guo Xiang Tan df7ccdb902 Remove phantomjs and install google-chrome-stable into test base image. 2017-12-19 13:10:03 +08:00
Charlie Lewis a00700c1ab MAINTAINER is deprecated, using LABEL now (#383)
* MAINTAINER is deprecated, using LABEL now

* converted maintainer to comments
2017-11-01 08:07:21 +11:00
Leo McArdle 6be270b122 create discourse_test_multsite db in discourse_dev image 2017-08-25 14:00:38 +01:00
Rafael dos Santos Silva d288199f66 More work to make automatic build easier 2017-02-01 00:41:39 -02:00
Rafael dos Santos Silva 674468764e Move everything to a complete base image 2017-01-31 13:21:00 -02:00
Rafael dos Santos Silva 0dbab775b0 Bumps image version to 1.3.10 2016-12-28 16:29:13 -02:00
Sam 0b03a3c168 add mailcatcher 2016-12-13 14:57:24 +11:00
Sam 634048cf68 Merge pull request #317 from ibnesayeed/master
Adding dev dependencies in the docker image
2016-12-13 14:55:09 +11:00
Sam 02da1cc9b3 some more db tuning 2016-12-13 14:54:14 +11:00
Sawood Alam a14f5e8046
Adding dev dependencies in the docker image 2016-12-12 18:46:37 -05:00
Sam 364df2987e need to migrate test as well 2016-12-12 17:45:04 +11:00
Sam 36613df924 correct issues with dev image 2016-12-12 17:36:15 +11:00
Rafael dos Santos Silva 5369fa7aca Bumps version to 1.3.9 2016-12-06 22:52:33 -02:00
Rafael dos Santos Silva 2aa612fecf Bumps images to 1.3.8 2016-11-16 22:49:19 -02:00
Rafael dos Santos Silva 7d0d783d63 Adds Makefile functions to build.rb 2016-10-19 18:31:18 -02:00