Commit graph

1604 commits

Author SHA1 Message Date
RBO
31455e8f77 update nginx patches for discourse 3.5.0 2025-02-28 17:50:10 +01:00
root
76356711d6 Also listen on v4
Signed-off-by: root <root@pitchmadattack.srv.it-syndikat.org>
2025-02-27 18:57:11 +01:00
root
fb672e0e1f ITS: Fix syntax error in nginx template 2025-02-27 18:57:11 +01:00
root
aee255b38a ITS: Try to fix nginx not listening on ipv6 2025-02-27 18:57:11 +01:00
root
cd64314edc Enable http2 2025-02-27 18:57:11 +01:00
root
41fa1ab406 ITS Add yxorp TLS-SNI support 2025-02-27 18:57:11 +01:00
Jay Pfaffman
a275b59627
Removing unicorn service from phpbb template broke the build ()
* Removing unicorn service from phpbb template broke the build

https://meta.discourse.org/t/migrate-a-phpbb3-forum-to-discourse/30810/786?u=pfaffman

* Prevent Sidekiq from running

Usually we don't want Sidekiq to run during an import because it might mess things up while there's incomplete or inconsistent data.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-02-27 11:24:26 -05:00
Jarek Radosz
526b43200c
Bump default base image to 2.0.20250226-0128 () 2025-02-26 12:02:42 +01:00
Jarek Radosz
45c0a02cc7
DEV: Re-add ghostscript to the base image () 2025-02-26 02:28:38 +01:00
Jarek Radosz
78e8b2a4cc
DEV: Use more recent version of libheif () 2025-02-26 01:17:03 +01:00
SouthpawKB
375bcf1675
DEV: Launcher Cleanup - Remove redundant word in error message () 2025-02-25 16:26:10 -05:00
David Taylor
3715498fc1
Update firefox tar format ()
Firefox started distributing `.tar.xz` instead of `.tar.bz2`
2025-02-11 12:11:29 +00:00
David Taylor
efd6bc8ccb
FIX: web.ssl.template compat with latest core ()
649505d869 added some new content between `listen 80;` and `gzip on;`, which broke these replacements.

This commit reorders & updates the replacements so that they should work reliably with versions of core before and after that change.
2025-02-04 20:01:48 +00:00
Gary Pendergast
e570a8c5c1
DEV: Force PNPM v9 to be installed. ()
Before upgrading PNPM to v10, we need to get Docker builds running again, so this change temporarily forces PNPM v9 to be installed.
2025-02-04 18:17:32 +11:00
mwaniki-wairungu
98f470fc25
FIX: attempt the postgresql update if a stale socket file exists () 2025-02-03 14:45:51 +03:00
mwaniki-wairungu
ad89eb3b10
FIX: install pgvector package for old PG versions during update () 2025-01-29 18:32:39 +03:00
mwaniki-wairungu
7b4839c5ea
Bump default base image to discourse/base:2.0.20250129-0720 ()
Follow-up to d9c837c783
2025-01-29 11:53:40 +03:00
mwaniki-wairungu
d9c837c783
FEATURE: Update base image and set default to postgresql 15 ()
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
Jarek Radosz
92ac6cbc9b
DEV: Update ImageMagick to 7.1.1-43 ()
We could use a bump, after two years since the last one.
2025-01-28 12:07:56 +01:00
Jarek Radosz
c41284d0d1
DEV: Update nginx to 1.26.1 () 2025-01-28 12:07:44 +01:00
nta~
79724e9e28
Fix TLS in socketed template ()
After 7d548ad4ae, the replacement pattern in web.socketed.template.yml no longer matches, making nginx.https.sock not exist.

As such, remove the `http2` field from the `listen` directive to match aforementioned commit.
2025-01-28 08:59:53 +08:00
Jarek Radosz
79ccbcc532
DEV: Update the workflow to Ubuntu 24.04 ()
The current LTS
2025-01-28 08:58:35 +08:00
Mwaniki Wairungu
90a1b46e98
FIX: use appropriate manifest for pg-15 image from 8a956d4bb
Follow-up to ab957b2f64
2025-01-27 12:40:00 +03:00
Alan Guo Xiang Tan
8a956d4bb1
Push docker manifest for discourse/base:2.0.${{ env.TIMESTAMP }}-15 ()
Follow-up to ab957b2f64
2025-01-27 16:41:30 +08:00
Michael Fitz-Payne
8057b695b7
DEV: bump timeout for non-scheduled builds ()
The most recent build timed out at 30 minutes. Bump timeout temporarily
to get a gauge on how long self-hosted builds take (push to Dockerhub
looks to be slower than Github-hosted runners).
2025-01-24 09:21:00 +08:00
Michael Fitz-Payne
e72554ed7f
DEV: switch amd64 builds to debian-12 runners
We can use our self-hosted action/runner machines to build the amd64
Docker images, falling back to the Github action/runner machines for the
arm64 builds.

Additionally, simplify the expression for how arm runners are selected.
The cost savings from switching to self-hosted runners dwarfs the
increase in 8core vs 2core arm runners.
2025-01-24 08:32:50 +10:00
Bianca Nenciu
e44bc08778
Revert "Add new Nginx config to base image ()" ()
We have decided to go another route and keep the Nginx config in the
Discourse repository, but add the outlets there.

This reverts commit 32dc866c85.
2025-01-23 15:46:29 +08:00
Bianca Nenciu
32dc866c85
Add new Nginx config to base image ()
This commit moves the Nginx config from discourse/discourse repository
and updates it with several 'include' statements that serve as extension
outlets.

This change was made to place the config closer to where it is used and
implements an alternative to the "find & replace" hacks.

It is unused at this moment, but all templates and samples will be
updated in a future commit.
2025-01-22 20:13:17 +02:00
Alan Guo Xiang Tan
0c7d085b38
DEV: Correct manifest name for images with PG 15 installed ()
Follow-up to ab957b2f64
2025-01-21 16:01:07 +08:00
Alan Guo Xiang Tan
ab957b2f64
Build images with PG 15 installed ()
This commit updates the build workflow to build and push an extra base Docker
image with PG 15 installed. The tag is not meant to be permanent and is
just meant to help us update our postgres templates to support PG 15
within the same commit.

The tag will be removed once our `discourse/base:release` ships with PG
15 by default.
2025-01-21 09:59:32 +08:00
Alan Guo Xiang Tan
136c638906
DEV: Remove invalid comment ()
This script is used by the build workflow which invalidates the comment
2025-01-16 08:48:16 +08:00
Jarek Radosz
6c5e2d1412
DEV: Remove unused docker images ()
1. `monitor` uses a 9 year old base image
2. `discourse_fast_switch` uses a 6 year old base image and references ruby 2.4 and 2.5
3. `discourse_bench` uses an 8 year old base image and references postgres 9.5
2025-01-16 07:52:39 +08:00
Jarek Radosz
aeb28ff600
DEV: Minor cleanup of the workflow () 2025-01-15 21:46:02 +01:00
Jeff Wong
fa85268554
Separate nginx build step ()
* Revert "Revert "Move nginx installation into another build step ()" ()"

This reverts commit 0e767585d6.

* add nginx runtime dependencies
2025-01-14 13:29:19 -08:00
David Taylor
107ffb40fe
Revert "Add nginx config file and support for outlets ()" ()
This reverts commit 01cbf07622.
2025-01-14 16:44:52 +00:00
Bianca Nenciu
01cbf07622
Add nginx config file and support for outlets ()
The nginx config file used to be copied from the discourse/discourse
repository, but it has been now moved in this project, closer to the
place where it is used.

The config has several 'include' statements that implement support for
outlets that templates can then use to extend the default configuration
for various features. This is an alternative to the "find & replace"
hacks.
2025-01-14 17:56:45 +02:00
Jarek Radosz
4f56ee9f72 Bump default base image to discourse/base:2.0.20250114-0014 2025-01-14 15:46:23 +01:00
Jarek Radosz
b345430a82
FEATURE: Update node to version 22.x () 2025-01-13 14:01:08 +01:00
Alan Guo Xiang Tan
d4ebd314de
DEV: Periodic bump of launcher () 2025-01-07 14:18:56 +08:00
Alan Guo Xiang Tan
ae194861f8
Bump Redis to 7.0.15 ()
Pulls in bug and security fixes since 7.0.7
2025-01-07 13:46:53 +08:00
Alan Guo Xiang Tan
0d0e1eb1de
Clean up firefox tar file in discourse/discourse_test image () 2024-12-27 12:51:33 +08:00
Alan Guo Xiang Tan
7cd3dce007
Remove git reset --hard command in web template to reduce layer size ()
I noticed that use running `git reset --hard` results in ~133MB being
added to the final layer generated by `launcher bootstrap`. However, I
can not figure out why we would need to run `git reset --hard` at all.

Even if there is a reason to run `git reset --hard`, it should not be
the default. If someone for whatever reason needs to run `git reset
--hard`, they should do so using the `before_code` hook.

To replicate the problem, one can run the following steps:

1. In the `discourse_docker` repository, create a file named `containers/test.yml` with the following contents:

```
base_image: discourse/base:2.0.20241223-0016

run:
  - exec: sudo -H -E -u discourse bash -c "cd /var/www/discourse && git reset --hard"
```

2. Run `./launcher bootstrap test`
3. Run `docker history local_discourse/test` and see that the new layer created by `./launcher bootstrap` is roughly 133MB.

```
IMAGE          CREATED         CREATED BY                                      SIZE      COMMENT
012471f3c5e4   2 minutes ago   /bin/bash -c /usr/local/bin/pups --stdin        133MB
```
2024-12-23 16:52:19 +08:00
Alan Guo Xiang Tan
2fb389f61d
Run npmp prune and bundle clean to clean up unused files ()
pnpm packages and bundle gems can add significant size to the Docker
image. Ensure that we clean up those unused files to ensure we don't
add extra diskspace to the final layer when bootstrapping.
2024-12-23 16:38:59 +08:00
Michael Brown
033eaadbbc Revert "FIX: Set the Host header in the nginx.conf upstream block"
This reverts commit d8a363b60e.

Support for this was removed in nginx - I was unintentionally testing on an old version
2024-12-19 15:56:22 -05:00
Michael Brown
d8a363b60e FIX: Set the Host header in the nginx.conf upstream block
Using e.g. `proxy_pass http://discourse` resets the Host header on the upstream
request to `discourse`.

This would break multisites, so we don't want that; the most effetive way to
ensure it's set properly is to `set_header` in the upstream block.
2024-12-19 15:29:49 -05:00
Alan Guo Xiang Tan
0e767585d6
Revert "Move nginx installation into another build step ()" ()
This reverts commit d963389430.

This broke certain assumptions like the `/etc/nginx` directory
exists.
2024-12-19 10:19:13 +08:00
Alan Guo Xiang Tan
12153f737e
Print docker history summary in build actions ()
It is useful to know what the size of each layer is after the image has
been built.
2024-12-18 09:09:50 +08:00
Alan Guo Xiang Tan
d963389430
Move nginx installation into another build step ()
Avoids polluting the main image with nginx's build dependencies
2024-12-18 07:07:26 +08:00
Alan Guo Xiang Tan
b375a7113f
Remove updating of rubygems ()
This adds an additional layer of 20mb for no reason. We don't need to be
running the latest version of rubygems all the time.

Even if we need to update rubygems, it should be updated in https://github.com/discourse/docker-ruby
2024-12-17 14:54:12 +08:00
Gullumluvl
0b74eeb842
Only parse a single line from lscpu to get the Cpu(s) count. Avoid localization. () 2024-12-17 14:02:21 +08:00