Jeff Atwood [Fri, 10 May 2019 21:08:46 +0000 (14:08 -0700)]
remove btrfs and overlay from "safe" storage drivers
Stephen [Tue, 7 May 2019 11:45:22 +0000 (04:45 -0700)]
Update bash path (#430)
Call the default bash for the environment.
Gerhard Schlager [Mon, 6 May 2019 12:55:25 +0000 (14:55 +0200)]
Update base image
It updates Ruby, nginx, ImageMagick, libpng, gifsicle and Node.js
Guo Xiang Tan [Fri, 3 May 2019 04:52:31 +0000 (12:52 +0800)]
Set the right RAILS_ENV for other base images.
Follow up to
c2c7a3d8f3aad26b0b1aea30eb5bf475d910ebc2.
Guo Xiang Tan [Fri, 3 May 2019 01:44:09 +0000 (09:44 +0800)]
Set RAILS_ENV for base image.
We can't boot the Rails app if it tries to require development
dependencies.
Guo Xiang Tan [Thu, 2 May 2019 02:18:59 +0000 (10:18 +0800)]
FIX: Don't install test gems in production.
This fixes an incorrect usage of the `--without` option.
As per the documentation, it takes groups seperated by a space `--without=GROUP[ GROUP...]`. Specifying the option twice meant we were overriding the first which lead the this bug.
Gerhard Schlager [Sat, 27 Apr 2019 08:08:16 +0000 (10:08 +0200)]
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/)
Geoff Reedy [Fri, 26 Apr 2019 08:25:27 +0000 (02:25 -0600)]
Use HEAD instead of @ shortcut for git in launcher (#428)
The abbreviation @ for HEAD was added in git 1.8.5. The launcher claims to be compatible with git version 1.8.0 but the use of this abbreviation breaks this compatibility. This change is needed to support RHEL 7.6 which has only git 1.8.3.1.
Guo Xiang Tan [Mon, 22 Apr 2019 03:02:10 +0000 (11:02 +0800)]
Update imagemagick to 7.0.8-41.
Guo Xiang Tan [Sat, 20 Apr 2019 01:03:19 +0000 (09:03 +0800)]
Run `bundle install` with 4 jobs.
Guo Xiang Tan [Mon, 15 Apr 2019 01:23:58 +0000 (09:23 +0800)]
Bump patch for imagemagick again.
Sam Saffron [Thu, 11 Apr 2019 02:43:55 +0000 (12:43 +1000)]
FEATURE: brotli support is not conditional
Due to changes in the core (backported to stable) all brotli support
is unconditional.
No need to carry any special logic here.
Guo Xiang Tan [Mon, 8 Apr 2019 00:14:46 +0000 (08:14 +0800)]
Bump imagemagick to 7.0.8-39.
Sam Saffron [Wed, 3 Apr 2019 06:01:48 +0000 (17:01 +1100)]
FIX: no longer allow protocol-less CDN
DISCOURSE_CDN_URL starting with `//` can lead to problems. Avoid allowing
people to enter it.
Guo Xiang Tan [Tue, 2 Apr 2019 08:05:00 +0000 (16:05 +0800)]
Add missing lines due to bad commit in
40fd876d1edb1a376a4eb592c9de4a178352a760.
Guo Xiang Tan [Tue, 2 Apr 2019 07:57:30 +0000 (15:57 +0800)]
Set `force_https` to true when Let's Encrypt cert checks out OK.
sau226 [Tue, 2 Apr 2019 07:04:21 +0000 (15:04 +0800)]
Bump acme.sh to 2.8.0 (#425)
Bump script for more API options, ACME v2 wildcard certs and bug fixes
Guo Xiang Tan [Thu, 28 Mar 2019 06:30:14 +0000 (14:30 +0800)]
Update imagemagick patch version.
Sam Saffron [Thu, 28 Mar 2019 01:22:09 +0000 (12:22 +1100)]
Update base image to Ruby 2.6.2 based image
Following extensive internal testing it is time to update our common base
image to 2.6.2 based one.
This also update various libraries, nginx and so on.
Gerhard Schlager [Mon, 25 Mar 2019 14:24:58 +0000 (15:24 +0100)]
Remove chromedriver; import script installs latest version
Sam Saffron [Thu, 21 Mar 2019 00:38:43 +0000 (11:38 +1100)]
Pull ImageMagick and libpng from official site
previously we were taking stuff from GitHub which is often out-of-date
Sam Saffron [Thu, 21 Mar 2019 00:12:29 +0000 (11:12 +1100)]
oops, 1.6.37 is not tagged yet use 36
Sam Saffron [Wed, 20 Mar 2019 23:46:05 +0000 (10:46 +1100)]
Update dependencies
Including minor upgrades for redis,ruby,image magick, libpng
One notable thing here is that I removed the SHA check from redis
I am not against checking SHA but we need to explode if it fails and do
something far more consistent across our various downloads
Sam Saffron [Tue, 19 Mar 2019 08:42:12 +0000 (19:42 +1100)]
FEATURE: add missing hooks into web.yml template
Previously bundle+migrate+precompile were in 1 big chunk making it
impossible to add multisite:migrate cleanly.
This adds 2 more hooks db_migrate and assets_precompile which make it way
simple to inject multisite migrate (either before or after db_migrate)
Sam Saffron [Tue, 19 Mar 2019 07:57:19 +0000 (18:57 +1100)]
FEATURE: add start-cmd to provide the command line used to launch container
This feature is only part done, this is a work in progress.
Sometimes it is handy to get the full docker command used to launch
a container, this allows us to cleanly amend it prior to starting.
This works like so:
```
sam@arch discourse_docker % ./launcher start-cmd redis
+ true run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e 'test=I am a test' -h arch-redis -e DOCKER_HOST_IP=172.17.0.1 --name redis -t -p 63799:6379 --expose 33333 -v /home/sam/Source/discourse_docker/shared:/shared --mac-address 02:3e:e9:30:d5:32 local_discourse/redis /sbin/boot
```
Though we really want it to output `docker` instead of `+ true`.
It is tricky in bash cause we handle quoting of `-e` and so on which makes
a straight echo not work as expected.
That said this kludge does give me enough to actually run some tests so
I welcome the progress
Created this so I can run side-by-side tests on various containers
Sam Saffron [Tue, 19 Mar 2019 07:52:23 +0000 (18:52 +1100)]
DEV: clean up docker detection
previously we would output stuff to console if docker.io was missing
Neil Lalonde [Thu, 7 Mar 2019 19:49:24 +0000 (14:49 -0500)]
Add a way to expose a port without publishing
Use the existing "expose" section of container yaml files, which has always been publishing ports.
Expose a port if a single port number is specified (`80`).
Publish if a port mapping is specified (`"80:80"`, `"127.0.0.1:20080:80"`).
David Taylor [Wed, 6 Mar 2019 13:02:20 +0000 (13:02 +0000)]
Add sidekiq.log to web template
Sam Saffron [Thu, 21 Feb 2019 03:14:13 +0000 (14:14 +1100)]
FEATURE: disable protected mode in redis
We do not require protected mode in redis cause it runs in a container
and is default protected.
Protected mode breaks running our template in a multi container setup or
certain users exposting redis from the container if they wish
Bhanu [Wed, 20 Feb 2019 07:01:03 +0000 (12:31 +0530)]
Update CDN URL in samples to have a protocol
* authored by Bhanu, reworded slightly by supermathie
Michael Brown [Tue, 19 Feb 2019 21:04:20 +0000 (16:04 -0500)]
boot: if container initialization steps fail, exit
Massimo Gorla [Tue, 19 Feb 2019 20:53:28 +0000 (21:53 +0100)]
fix: ampersand with no quotes truncates echo output (#421)
Sam [Mon, 18 Feb 2019 04:17:21 +0000 (15:17 +1100)]
Update image dependencies
- Update NGINX to latest stable
- Update pngquant to latest stable
- Update ImageMagick to latest stable
Also, remove extra ruby install, it is no longer needed
Sam [Mon, 18 Feb 2019 02:27:38 +0000 (13:27 +1100)]
FEATURE: update base image to Ruby 2.6.1
Due to https://meta.discourse.org/t/logster-2-1-0-causes-segfault-running-unicorn-in-discourse-dev-docker-image/109265
we are stuck upgrading base image.
https://github.com/github/ruby/pull/40 by @tenderlove is backported to 2.5
but we are still waiting on 2.5.4
To avoid a custom patch in our image I opted to move base to 2.6.1 and pick
up the fix direct from 2.6
Sam Saffron [Sun, 17 Feb 2019 22:38:13 +0000 (09:38 +1100)]
Update docker base image
This covers quite a few important change
1. We updated maxmind db
2. We upgraded redis to version 5
3. It forces a rebuild for important nginx changes
4. It updates all gems, a ton got updated, this speeds up rebuild
Dan Ungureanu [Fri, 15 Feb 2019 13:46:32 +0000 (15:46 +0200)]
Redis is configured without pidfile.
Dan Ungureanu [Fri, 15 Feb 2019 13:41:24 +0000 (15:41 +0200)]
Remove Redis service from base.
Dan Ungureanu [Fri, 15 Feb 2019 13:31:19 +0000 (15:31 +0200)]
chmod a+x ./redis
Dave Eargle [Mon, 11 Feb 2019 21:27:23 +0000 (21:27 +0000)]
merge docker_args with user_args for launcher file
Sam [Wed, 13 Feb 2019 22:18:38 +0000 (09:18 +1100)]
DEV: cleanup docker prune pattern
- When out of space don't prompt a second time to cleanup
- Remove docker gc script which is unused
- Use system prune -a consistently
Sam [Tue, 12 Feb 2019 10:04:30 +0000 (21:04 +1100)]
FEATURE: swap to using "docker system prune"
Stop using `docker gc` by spotify for image cleanup, instead use:
`docker system prune`
The new method is maintained by docker, old mechanism is no longer really
needed
Saj Goonatilleke [Mon, 11 Feb 2019 12:36:15 +0000 (23:36 +1100)]
Eschew the rsyslogd PID file
This PID file is not required, provides questionable operational value,
and can break logging in a Discourse application container.
On startup, rsyslogd will read `rsyslogd.pid` and self-terminate if it
finds another process on the system with the same PID as that which was
written to this file. This behaviour is especially problematic when
running in a containerised environment:
- The processes that make up a container are more likely to be
terminated without grace. Any PID files persisted to the container's
filesystem will become stale after an unclean shutdown. (Separately,
even when signalled with `SIGTERM` on graceful shutdown, rsyslogd will
still fail to unlink this file.)
- PIDs on Linux are assigned sequentially. When run in a unique `pid`
namespace, a container's process table is subject to little entropy.
Thus, PID 'collisions' across container instantiations are not
unlikely.
Altogether, it is easy for rsyslogd to DoS itself on startup by
mistaking another process in the container (e.g.: nginx) for an existent
rsyslogd process. Unlinking this file guarantees a clean startup.
Newer releases of rsyslog support `-iNONE`, but -- of course -- this
feature is not supported in the rsyslog distribution included as part of
Ubuntu 16.04:
https://github.com/rsyslog/rsyslog/blob/
527f19c56a80fd30354f32ad03bdacc1275f4aa8/ChangeLog#L1618-L1623
Vixie crond and nginx also employ PID files, though neither is
vulnerable to this failure mode. Vixie cron wraps the fd with a flock;
the flock is used for mutual exclusion, not the underlying file itself.
nginx does not appear to use its PID file for mutual exclusion.
Neil Lalonde [Fri, 8 Feb 2019 19:10:41 +0000 (14:10 -0500)]
support expose in templates
Dan Ungureanu [Fri, 1 Feb 2019 04:59:08 +0000 (06:59 +0200)]
Build Redis from source. (#417)
Arpit Jalan [Tue, 29 Jan 2019 10:43:25 +0000 (16:13 +0530)]
Configure Git for `discourse` user
Arpit Jalan [Mon, 28 Jan 2019 10:40:46 +0000 (16:10 +0530)]
Configure Git in test image (#418)
Guo Xiang Tan [Wed, 23 Jan 2019 05:49:06 +0000 (13:49 +0800)]
Guo Xiang Tan [Wed, 23 Jan 2019 05:27:21 +0000 (13:27 +0800)]
Guo Xiang Tan [Wed, 23 Jan 2019 03:56:29 +0000 (11:56 +0800)]
FEATURE: Support `{{config}}` replacement to template name in `env`.
Guo Xiang Tan [Thu, 17 Jan 2019 09:47:46 +0000 (17:47 +0800)]
Guo Xiang Tan [Thu, 17 Jan 2019 02:03:28 +0000 (10:03 +0800)]
FIX: Print usage when config is not passed to launcher.
Gerhard Schlager [Tue, 15 Jan 2019 16:33:33 +0000 (17:33 +0100)]
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"
Eduardo Poleo [Thu, 10 Jan 2019 04:14:39 +0000 (23:14 -0500)]
Launcher script breaks at high numbers of sites (#414)
On a multi-site app configuration files such as containers/web.yml
grow with the number of sites. We discovered that the launcher script breaks
at around 100 sites due to "Argument List too long" when
commands such 'echo' are being referenced from the within the exec
call.
This workaround echoes the "$input" content outside the exec (which we verified
works fine for 300 sites) and then cats the file content inside the
exec. Thus bypassing the argument limitation. Finally, we remove the temporary file generated.
Joshua Rosenfeld [Fri, 21 Dec 2018 18:57:54 +0000 (13:57 -0500)]
Add missing license file
License type was listed in README, but no license file was present
Rafael dos Santos Silva [Tue, 27 Nov 2018 07:39:46 +0000 (05:39 -0200)]
Make our swap config compatible with systemd >= 207 (#331)
Sam [Fri, 23 Nov 2018 04:09:11 +0000 (15:09 +1100)]
FEATURE: added template for critical DNS caching
Guo Xiang Tan [Mon, 19 Nov 2018 08:31:16 +0000 (16:31 +0800)]
Support `--run-image` option for launcher.
Gerhard Schlager [Wed, 31 Oct 2018 16:33:25 +0000 (17:33 +0100)]
Rename template for consistency
Sam [Wed, 31 Oct 2018 04:48:17 +0000 (15:48 +1100)]
bump launcher for IP address lookups
Gerhard Schlager [Tue, 30 Oct 2018 23:48:58 +0000 (00:48 +0100)]
Add template for including Chrome and ChromeDriver
Gerhard Schlager [Tue, 30 Oct 2018 23:48:31 +0000 (00:48 +0100)]
Improve template for mbox imports
* Do not prevent sidekiq from running
* mbox import script has been renamed
Sam Saffron [Tue, 23 Oct 2018 21:56:14 +0000 (08:56 +1100)]
correct template to insert policy at the right spot
Sam [Thu, 18 Oct 2018 07:44:35 +0000 (18:44 +1100)]
revert update for now as it breaks our test suite
Sam [Thu, 18 Oct 2018 06:41:24 +0000 (17:41 +1100)]
tweaks required to get this to build... ruby now needs ruby to install ruby
Sam Saffron [Wed, 17 Oct 2018 22:26:24 +0000 (09:26 +1100)]
bump version of image magick / libpng
Sam Saffron [Wed, 17 Oct 2018 22:20:43 +0000 (09:20 +1100)]
Upgrade Ruby to Version 2.5.2
(security patches are included in 2.5.2)
Guo Xiang Tan [Wed, 10 Oct 2018 06:21:44 +0000 (14:21 +0800)]
Bump `discourse/base` docker image.
Includes the new maxmind db rake task to resolve location based on IP.
Sam [Wed, 10 Oct 2018 00:27:31 +0000 (11:27 +1100)]
Revert "Revert
f4973e9280e2604a426767e9eca4f698e0cad5b3 since we can't use Rails at this point"
This reverts commit
a0586b4a13704e5257ca294a7b6d83024cddf839.
(master is now fixed to allow this rake task)
Régis Hanol [Tue, 9 Oct 2018 15:52:41 +0000 (17:52 +0200)]
Revert
f4973e9280e2604a426767e9eca4f698e0cad5b3 since we can't use Rails at this point
Régis Hanol [Tue, 9 Oct 2018 14:22:27 +0000 (22:22 +0800)]
Merge pull request #410 from nbianca/maxminddb
Run Rake task to fetch MaxMindDb.
Gerhard Schlager [Thu, 4 Oct 2018 23:31:59 +0000 (01:31 +0200)]
Move tmp directories for backups and restores into /shared (#411)
Large temporary files shouldn't be stored inside of the Docker container.
Bianca Nenciu [Wed, 3 Oct 2018 14:18:37 +0000 (17:18 +0300)]
Run Rake task to fetch MaxMindDb.
Vincent [Fri, 28 Sep 2018 09:41:18 +0000 (11:41 +0200)]
Use rm -rf in remove-old-socket (#409)
In some cases, the leftover socket is actually a directory.
Guo Xiang Tan [Tue, 18 Sep 2018 09:46:27 +0000 (17:46 +0800)]
Make `./launcher run` use the run image instead.
Guo Xiang Tan [Tue, 18 Sep 2018 09:28:56 +0000 (17:28 +0800)]
`./launhcer run` should exit with the right code.
Guo Xiang Tan [Tue, 18 Sep 2018 09:12:08 +0000 (17:12 +0800)]
Can't use `--login` because bash profile hasn't been created.
This reverts commit
4535fb546081817f0a2ffdd9cc587191b46e4a5f.
Guo Xiang Tan [Tue, 18 Sep 2018 09:10:44 +0000 (17:10 +0800)]
Run command in Discourse's dir by default.
Guo Xiang Tan [Tue, 18 Sep 2018 09:06:20 +0000 (17:06 +0800)]
FEATURE: Add `./launcher run` command.
This is useful for running custom commands
with the config for a given template.
Guo Xiang Tan [Tue, 11 Sep 2018 09:02:40 +0000 (17:02 +0800)]
Merge pull request #397 from pfaffman/patch-1
.gitignore show some love for emacs
Guo Xiang Tan [Fri, 7 Sep 2018 06:48:09 +0000 (14:48 +0800)]
Remove prettier from the base image.
This should be installed by yarn.
Kyle Zhao [Mon, 3 Sep 2018 01:18:58 +0000 (09:18 +0800)]
rubygems still use .org (#407)
`ruby-china` gems mirror changed to `.com` due to ICP Filing complications
The original rubygems source still uses .org, though
scavin [Mon, 3 Sep 2018 00:32:59 +0000 (08:32 +0800)]
ruby-china change domain (#406)
Matt Palmer [Mon, 27 Aug 2018 00:50:23 +0000 (10:50 +1000)]
Speed up mass-chown
Joshua Rosenfeld [Sun, 19 Aug 2018 23:40:02 +0000 (19:40 -0400)]
Merge pull request #404 from camilleroux/patch-1
Typo fix
Camille Roux [Sun, 19 Aug 2018 23:37:10 +0000 (01:37 +0200)]
Typo fix
Rafael dos Santos Silva [Fri, 17 Aug 2018 20:08:14 +0000 (17:08 -0300)]
Remove old build script
Rafael dos Santos Silva [Fri, 17 Aug 2018 20:06:58 +0000 (17:06 -0300)]
Update image docs
Sam [Thu, 2 Aug 2018 07:38:44 +0000 (17:38 +1000)]
update web template to check for thpoff
Sam [Thu, 2 Aug 2018 07:00:20 +0000 (17:00 +1000)]
FEATURE: disable huge pages in PG, web and redis
Sam [Thu, 2 Aug 2018 05:01:42 +0000 (15:01 +1000)]
FEATURE: ability to turn off transparent huge pages on arbitrary programs
Gerhard Schlager [Wed, 1 Aug 2018 20:33:33 +0000 (22:33 +0200)]
Revert "Add libicu-dev for charlock_holmes gem"
This reverts commit
2ad56e6b097b80833695ef644574fd2e511338ed.
Sam [Tue, 31 Jul 2018 02:16:41 +0000 (12:16 +1000)]
Add tcmalloc as an optional allocator
Joffrey JAFFEUX [Mon, 30 Jul 2018 15:43:26 +0000 (11:43 -0400)]
fixes prettier version at 1.14.0
Michael Scherer [Mon, 30 Jul 2018 06:21:25 +0000 (08:21 +0200)]
Make launcher work with french locale (among others) (#395)
On several locales others than C, A-Z might match more than A to Z, due
to different collation order.
See https://unix.stackexchange.com/questions/227070/why-does-a-z-match-lowercase-letters-in-bash
for explanation.
Rishabh [Mon, 30 Jul 2018 00:14:44 +0000 (05:44 +0530)]
Improved Let's Encrypt email argument (#400)
Gerhard Schlager [Thu, 26 Jul 2018 12:18:04 +0000 (14:18 +0200)]
Add libicu-dev for charlock_holmes gem
Guo Xiang Tan [Tue, 24 Jul 2018 06:22:50 +0000 (14:22 +0800)]
Use github archive for ImageMagick instead.
Guo Xiang Tan [Mon, 23 Jul 2018 03:45:37 +0000 (11:45 +0800)]
Bump base image for launcher.
Guo Xiang Tan [Wed, 18 Jul 2018 01:53:14 +0000 (09:53 +0800)]
Remove replace commands that are no longer required in Imagemagick7.
Guo Xiang Tan [Tue, 17 Jul 2018 06:30:50 +0000 (14:30 +0800)]
Update imagemagick to ImageMagick7.