Commit Graph

1589 Commits

Author SHA1 Message Date
Gabe Pacuilla 48dca72779
DEV: update ImageMagick to 7.1.0-62 (#679) 2023-02-13 23:01:50 -05:00
Leonardo Mosquera 1d5c31719a
Correct parameter naming for PTY.spawn (#678)
Per the docs, first parameter for the block is STDOUT + STDERR, 2nd one is STDIN:
https://ruby-doc.org/3.1.3/exts/pty/PTY.html#method-c-spawn

As it is now, the method looks like it's reading from STDIN, though in
fact it's reading from an incorrectly named parameter for STDOUT.
2023-02-13 20:19:47 -03:00
Rafael dos Santos Silva cdc5f905a2
FIX: Relax min kernel version (#674) [ci skip]
Users reported Discourse installing fine on kernel 4.4+.

See https://meta.discourse.org/t/kernel-version-upgrade-required-when-manually-updating-discourse/253756?u=falco
2023-02-03 16:47:47 -03:00
Rafael dos Santos Silva b952c711a1
Add kernel version check (#673) [ci skip]
On Ruby 3.1 there is a `RuntimeException` when calling `Random.urandom` on platforms where it's not properly implemented, which includes people running Ubuntu 14.04 with kernel 3.13.

See

https://meta.discourse.org/t/docker-build-broken-site-down/252047
https://meta.discourse.org/t/undefined-method-deprecated-for-nil-nilclass-on-rebuild/251711
https://meta.discourse.org/t/discourse-update-error/253197
https://meta.discourse.org/t/bootstrap-failure-during-most-recent-upgrade/253424
2023-01-31 15:31:02 -03:00
David Taylor 05ee40d778
FIX: Perform git operations as owning user (#672)
The `git` version in our discourse_test docker image was recently updated to include a permissions check before running any git commands. For this to pass, git operations must be performed by the user which owns the git repository's directory.
2023-01-30 16:06:46 +00:00
Rafael dos Santos Silva 445346caf5 Bump base image for ImageMagick SVG fix 2023-01-18 12:23:30 -03:00
Rafael dos Santos Silva 1dc7ce451d Add explicit SVG delete to ImageMagick 2023-01-13 00:09:41 -03:00
Rafael dos Santos Silva c5b65bbd0a Bump stable image 2023-01-12 01:05:24 -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 46ea141eef
Update deprecated `::set-output` in GitHub actions workflow (#664) 2023-01-03 17:29:46 +00:00
David Taylor 6fd2f37d65
discourse_test: Only apply `ENTRYPOINT` to release image (#663)
The slim images aren't able to run the full `rake docker:test` task, so having it as the entrypoint doesn't make sense. We only want it as the entrypoint on `discourse_test:release`
2023-01-03 17:20:49 +00:00
David Taylor d01e8ad13b
Use larger GitHub actions workers (#661)
Larger workers will be used for non-cron triggers to improve feedback-loop time when actively working on changes to the repository
2023-01-03 16:36:36 +00:00
David Taylor c71c9f2154 Fix tagging 2023-01-02 11:58:49 -03:00
David Taylor 76383a95e6 DEV: Allow booting app with slim image and make default for aarch46 2023-01-02 11:58:49 -03:00
Rafael dos Santos Silva 13bfcd2517 Revert "Revert last nginx bump"
This reverts commit f2d598c2cd.

We fixed the nginx.config in core to work with latest nginx
2022-12-30 13:15:05 -03:00
Rafael dos Santos Silva f2d598c2cd Revert last nginx bump
Still investigating, but something between a Discourse site being
proxied as unicorn>nginx>haproxy>cloudflare broke on the new nginx.
2022-12-28 20:17:09 -03:00
Rafael dos Santos Silva e948b14527 Automatic old image switch for stable 2022-12-28 12:21:49 -03:00
David Taylor e05f79c72c
Revert "bump base image for Ruby 3.1.3" (#653)
This reverts commit 0595fc2821.

The new image is currently incompatible with the Discourse stable branch.
2022-12-28 14:47:34 +00:00
Rafael dos Santos Silva 0595fc2821 bump base image for Ruby 3.1.3 2022-12-27 16:00:54 -03:00
Rafael dos Santos Silva 9cd1d8a338 Update Ruby to 3.1.3 and deps bump 2022-12-21 06:23:16 +08:00
Rafael dos Santos Silva 0387528876 Revert "Update Ruby to 3.2"
This reverts commit c8837e7516.
2022-12-21 06:23:16 +08:00
Rafael dos Santos Silva c562672f9a Revert "bump deps"
This reverts commit b1d243400c.
2022-12-21 06:23:16 +08:00
Rafael dos Santos Silva b1d243400c bump deps 2022-12-20 17:37:35 -03:00
Rafael dos Santos Silva c8837e7516 Update Ruby to 3.2 2022-12-20 17:37:35 -03:00
Jarek Radosz e0f27d1340
FEATURE: Update node to version 18.x (#646) 2022-11-15 12:16:05 +01:00
Jarek Radosz 130c32c701
FEATURE: Add `pnpm` to the base slim image (#645) 2022-11-15 12:15:54 +01:00
Glenn Adams 30be122eb7 Ubuntu Jammy (22.04) doesn't have libwebp6
Conditionally use libwebp7 on Jammy. N.B. This conditionalization should probably be generalized.
2022-09-27 10:59:14 -03:00
David Taylor 8c40388ae4
FIX: Reorder yarn/bundle install for compatibility (#642)
Some existing templates (e.g. those written by following [the multisite guide](https://meta.discourse.org/t/multisite-configuration-with-docker/14084) use the `after_bundle_exec` hook to run application code like `multisite:migrate`. Relatively recently, the ruby app has started depending on `yarn` dependencies for basic functionality, and therefore requires `yarn install` to have been run to avoid errors.

This commit moves the `yarn install` step before `bundle install`, so that existing users of the `after_bundle_exec` hook do not need to update their templates.
2022-09-17 13:22:34 +01:00
Gabe Pacuilla 2c907ea403
FIX: use proper acmesh-official upstream repo (#641) 2022-09-12 18:34:27 -04:00
Andrew Schleifer ea8cb333ef Bump default base image to discourse/base:2.0.20220818-0047 2022-08-19 08:22:45 +08:00
Andrew Schleifer eeefdde609 Bump default base image to discourse/base:2.0.20220720-0049 2022-07-21 14:22:07 +08: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
David Taylor 3536c188e5
DEV: Use yarn `--frozen-lockfile` in production (#637)
This ensures that a `yarn install` will never modify the lockfile. We always want to use the lockfile from source control.
2022-07-13 14:04:27 +01:00
Andrew Schleifer 7ab9e3afc7 Bump default base image to 2.0.20220621-0049 2022-06-22 10:26:08 +08:00
Andrew Schleifer 05cbdb36dd slim: use apt-get instead of apt
WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

Also apply some DEBIAN_FRONTEND=noninteractive because this is running
in CI.
2022-06-22 10:10:03 +08:00
David Taylor 43e16ca702
DEV: Remove Ember CLI flag from templates (#633)
Ember CLI assets are now the only option in Discourse. This flag is now a no-op.
2022-06-20 19:12:17 +01:00
Jarek Radosz 32d40fc924
FIX: Update the macOS memory check (#632)
`free` is not available by default on macOS
2022-06-14 00:10:43 +02: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
Gabe Pacuilla 241a42ce71
DEV: Ensure secure file permissions by default (#627)
`discourse-setup` will now ensure container definitions are
installed with `0600` permissions mode only.

`launcher` will now throw a warning when an existing container
definition is world-readable.

Also clean up leftover `launcher setup` logic which no longer exists.
Merge pre-existing logic into `check_prereqs` function.
2022-05-03 11:54:24 -04:00
Michael Brown 165ede9719 FIX: ensure the latest image is always pulled for the container we're building
If the user has overridden the `base_image` to something other than default, we
may not get the latest version of that image when bootstrapping.

To remedy, always pull the image to check the manifest after we parse it out.
2022-05-02 22:48:19 -04:00
Jarek Radosz 1e1571e370
FIX: rsyslog uses `adm` group now (#625)
`syslog` group doesn't exist anymore and:

```
# grep -i 'group' /etc/rsyslog.conf
$FileGroup adm
```
2022-04-29 20:28:47 +02:00
Jarek Radosz 0ea4ee497f
DEV: Add usage info to auto_build script (#626) 2022-04-29 14:19: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
Jarek Radosz 7254f7d13d
DEV: Fix workflow formatting (#623)
and update actions/checkout version
2022-04-29 12:18:02 +02:00
Jarek Radosz 14627344f3
DEV: Update readme (#622) 2022-04-29 11:40:27 +02:00
Rafael dos Santos Silva 71ba9fb7b5 Always pull image on arm 2022-04-19 18:24:16 -03:00
Alan Guo Xiang Tan 2a9faf7e56 Bump default base image.
Pulls in b5ea6784b2.
2022-04-13 13:16:56 +08:00
Alan Guo Xiang Tan b5ea6784b2 Bump base Ruby version to 2.7.6
Pulls in fix for CVE-2022-28739

https://www.ruby-lang.org/en/news/2022/04/12/buffer-overrun-in-string-to-float-cve-2022-28739/
2022-04-13 11:33:02 +08:00
Stefan Weil a5a9890fbe
Fix some typos (found by codespell) (#613)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-04-05 11:27:51 +02:00