Commit graph

1604 commits

Author SHA1 Message Date
Alan Guo Xiang Tan
3d317b7f58 Bump default base image to run Ruby 3.2.2 as default
Ruby 3.2.2 was released with a two security fixes. While the security
fixes have been assessed to have low impact on Discourse, we still want
to get the upgrade in as a preventive measure.
2023-04-10 09:07:00 +08:00
Michael Brown
7a7c47eefa
Add template to enable an IPv6 listener
By default nginx in the container only listens for IPv4 connections. Some users
want to enable direct IPv6 connectivity to the container either via forwarding
or NAT. This provides an easy method to allow that.
2023-04-04 13:36:41 -04:00
David Taylor
4f610e7b5c
Remove stable-specific image ()
This was only introduced as a temporary solution for Discourse 2.8, which is now EOL
2023-04-04 10:05:11 +01:00
Rafael dos Santos Silva
0539d9cb84
Bum to latest Ruby () 2023-03-31 11:50:12 -03:00
Blake Erickson
3d3b7c8584
DEV: Ubuntu installs do not like bullseye-backports ()
Check for Ubuntu 22.04 and 22.10 versions before trying to use
`bullseye-backports` otherwise they throw this error.

```
E: The value 'bullseye-backports' is invalid for APT::Default-Release as
such a release is not available in the sources failed
```
2023-03-26 07:12:01 -06:00
Gerhard Schlager
5aad43b1d6
FIX: Rebuild was broken when an older image with shallow clone was used ()
This adds the original special handling for shallow clones back. It can be removed once everyone uses images with partial clones.
2023-03-13 21:55:19 +01:00
Gerhard Schlager
01f80524b8
Bump base image to support partial clone () 2023-03-13 15:31:22 +01:00
Gerhard Schlager
53bbacc882
DEV: Create partial clone of discourse repository ()
A treeless clone is nearly as small as a shallow clone, but it contains the full history which makes it possible to easily checkout tags and commits and allows all features of docker_manager to work correctly.

See https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ for more information on treeless clones.

Also this change makes it possible to correctly pull the main branch which didn't work before.
2023-03-13 10:58:46 +01:00
Gerhard Schlager
98fa6d771d
DEV: Remove deprecation warnings from bundler () 2023-03-13 10:55:44 +01:00
Gerhard Schlager
be563a4df5
FIX: Compiling oxipng didn't work on aarch64 ()
This uses the new sparse-registry feature from Rust 1.68 which lowers the memory usage. This avoids that cargo is killed due to an OOM issue (exit code 137) during "Updating crates.io index".
2023-03-13 10:55:15 +01:00
Derek J. Lambert
6c2c026ad3
Compile oxipng from source ()
* Download and compile oxipng from source
* Move oxipng install step after rust since it uses cargo
2023-03-09 13:04:11 +11:00
Rafael dos Santos Silva
4810f76dcc
Bump base image for Ruby 3.2 () 2023-02-24 11:39:14 -03:00
Andrew Schleifer
69c82fa112 Bump default base image to discourse/base:2.0.20230217-0055 2023-02-20 11:50:18 +08:00
Rafael dos Santos Silva
f68a5cb34d
DEV: Bump Ruby to 3.2.1 ()
* DEV: Bump Ruby to 3.2.0

* Add libffi-dev

* Ruby 3.2.1
2023-02-17 20:04:22 -03:00
Jarek Radosz
67690fe645
DEV: Remove Press any key from arm64 path () 2023-02-16 12:07:09 +01:00
Gabe Pacuilla
48dca72779
DEV: update ImageMagick to 7.1.0-62 () 2023-02-13 23:01:50 -05:00
Leonardo Mosquera
1d5c31719a
Correct parameter naming for PTY.spawn ()
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 () [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 () [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 ()
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 () 2023-01-10 20:43:35 +00:00
David Taylor
e6cb71cd55
discourse_dev: use local bundler directory for temp install ()
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 () 2023-01-03 17:29:46 +00:00
David Taylor
6fd2f37d65
discourse_test: Only apply ENTRYPOINT to release image ()
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 ()
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" ()
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 () 2022-11-15 12:16:05 +01:00
Jarek Radosz
130c32c701
FEATURE: Add pnpm to the base slim image () 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 ()
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 () 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 ()
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 ()
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