discourse_docker.git
5 years agoRemove Redis service from base.
Dan Ungureanu [Fri, 15 Feb 2019 13:41:24 +0000 (15:41 +0200)]
Remove Redis service from base.

5 years agochmod a+x ./redis
Dan Ungureanu [Fri, 15 Feb 2019 13:31:19 +0000 (15:31 +0200)]
chmod a+x ./redis

5 years agomerge docker_args with user_args for launcher file
Dave Eargle [Mon, 11 Feb 2019 21:27:23 +0000 (21:27 +0000)]
merge docker_args with user_args for launcher file

5 years agoDEV: cleanup docker prune pattern
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

5 years agoFEATURE: swap to using "docker system prune"
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

5 years agoEschew the rsyslogd PID file
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.

5 years agosupport expose in templates
Neil Lalonde [Fri, 8 Feb 2019 19:10:41 +0000 (14:10 -0500)]
support expose in templates

5 years agoBuild Redis from source. (#417)
Dan Ungureanu [Fri, 1 Feb 2019 04:59:08 +0000 (06:59 +0200)]
Build Redis from source. (#417)

5 years agoConfigure Git for `discourse` user
Arpit Jalan [Tue, 29 Jan 2019 10:43:25 +0000 (16:13 +0530)]
Configure Git for `discourse` user

5 years agoConfigure Git in test image (#418)
Arpit Jalan [Mon, 28 Jan 2019 10:40:46 +0000 (16:10 +0530)]
Configure Git in test image (#418)

5 years agoFix extra spaces appearing in ENV.
Guo Xiang Tan [Wed, 23 Jan 2019 05:49:06 +0000 (13:49 +0800)]
Fix extra spaces appearing in ENV.

7a092241d1ee2b515a652ad71a134162a6f05cde

5 years agoFix bug introduced in faaa8c17ca08d22563ab0153b7f964d937f269bf.
Guo Xiang Tan [Wed, 23 Jan 2019 05:27:21 +0000 (13:27 +0800)]
Fix bug introduced in faaa8c17ca08d22563ab0153b7f964d937f269bf.

5 years agoFEATURE: Support `{{config}}` replacement to template name in `env`.
Guo Xiang Tan [Wed, 23 Jan 2019 03:56:29 +0000 (11:56 +0800)]
FEATURE: Support `{{config}}` replacement to template name in `env`.

5 years agoFix regression due to f80e6a37a9d748f43047141b18986f6386444bc9.
Guo Xiang Tan [Thu, 17 Jan 2019 09:47:46 +0000 (17:47 +0800)]
Fix regression due to f80e6a37a9d748f43047141b18986f6386444bc9.

5 years agoFIX: Print usage when config is not passed to launcher.
Guo Xiang Tan [Thu, 17 Jan 2019 02:03:28 +0000 (10:03 +0800)]
FIX: Print usage when config is not passed to launcher.

5 years agoUpgrade node to v10 for test and dev
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"

5 years agoLauncher script breaks at high numbers of sites (#414)
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.

5 years agoAdd missing license file
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

5 years agoMake our swap config compatible with systemd >= 207 (#331)
Rafael dos Santos Silva [Tue, 27 Nov 2018 07:39:46 +0000 (05:39 -0200)]
Make our swap config compatible with systemd >= 207 (#331)

6 years agoFEATURE: added template for critical DNS caching
Sam [Fri, 23 Nov 2018 04:09:11 +0000 (15:09 +1100)]
FEATURE: added template for critical DNS caching

6 years agoSupport `--run-image` option for launcher.
Guo Xiang Tan [Mon, 19 Nov 2018 08:31:16 +0000 (16:31 +0800)]
Support `--run-image` option for launcher.

6 years agoRename template for consistency
Gerhard Schlager [Wed, 31 Oct 2018 16:33:25 +0000 (17:33 +0100)]
Rename template for consistency

6 years agobump launcher for IP address lookups
Sam [Wed, 31 Oct 2018 04:48:17 +0000 (15:48 +1100)]
bump launcher for IP address lookups

6 years agoAdd template for including Chrome and ChromeDriver
Gerhard Schlager [Tue, 30 Oct 2018 23:48:58 +0000 (00:48 +0100)]
Add template for including Chrome and ChromeDriver

6 years agoImprove template for mbox imports
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

6 years agocorrect template to insert policy at the right spot
Sam Saffron [Tue, 23 Oct 2018 21:56:14 +0000 (08:56 +1100)]
correct template to insert policy at the right spot

6 years agorevert update for now as it breaks our test suite
Sam [Thu, 18 Oct 2018 07:44:35 +0000 (18:44 +1100)]
revert update for now as it breaks our test suite

6 years agotweaks required to get this to build... ruby now needs ruby to install ruby
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

6 years agobump version of image magick / libpng
Sam Saffron [Wed, 17 Oct 2018 22:26:24 +0000 (09:26 +1100)]
bump version of image magick / libpng

6 years agoUpgrade Ruby to Version 2.5.2
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)

6 years agoBump `discourse/base` docker image.
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.

6 years agoRevert "Revert f4973e9280e2604a426767e9eca4f698e0cad5b3 since we can't use Rails...
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)

6 years agoRevert f4973e9280e2604a426767e9eca4f698e0cad5b3 since we can't use Rails at this...
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

6 years agoMerge pull request #410 from nbianca/maxminddb
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.

6 years agoMove tmp directories for backups and restores into /shared (#411)
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.

6 years agoRun Rake task to fetch MaxMindDb.
Bianca Nenciu [Wed, 3 Oct 2018 14:18:37 +0000 (17:18 +0300)]
Run Rake task to fetch MaxMindDb.

6 years agoUse rm -rf in remove-old-socket (#409)
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.

6 years agoMake `./launcher run` use the run image instead.
Guo Xiang Tan [Tue, 18 Sep 2018 09:46:27 +0000 (17:46 +0800)]
Make `./launcher run` use the run image instead.

6 years ago`./launhcer run` should exit with the right code.
Guo Xiang Tan [Tue, 18 Sep 2018 09:28:56 +0000 (17:28 +0800)]
`./launhcer run` should exit with the right code.

6 years agoCan't use `--login` because bash profile hasn't been created.
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.

6 years agoRun command in Discourse's dir by default.
Guo Xiang Tan [Tue, 18 Sep 2018 09:10:44 +0000 (17:10 +0800)]
Run command in Discourse's dir by default.

6 years agoFEATURE: Add `./launcher run` command.
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.

6 years agoMerge pull request #397 from pfaffman/patch-1
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

6 years agoRemove prettier from the base image.
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.

6 years agorubygems still use .org (#407)
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

6 years agoruby-china change domain (#406)
scavin [Mon, 3 Sep 2018 00:32:59 +0000 (08:32 +0800)]
ruby-china change domain (#406)

6 years agoSpeed up mass-chown
Matt Palmer [Mon, 27 Aug 2018 00:50:23 +0000 (10:50 +1000)]
Speed up mass-chown

6 years agoMerge pull request #404 from camilleroux/patch-1
Joshua Rosenfeld [Sun, 19 Aug 2018 23:40:02 +0000 (19:40 -0400)]
Merge pull request #404 from camilleroux/patch-1

Typo fix

6 years agoTypo fix
Camille Roux [Sun, 19 Aug 2018 23:37:10 +0000 (01:37 +0200)]
Typo fix

6 years agoRemove old build script
Rafael dos Santos Silva [Fri, 17 Aug 2018 20:08:14 +0000 (17:08 -0300)]
Remove old build script

6 years agoUpdate image docs
Rafael dos Santos Silva [Fri, 17 Aug 2018 20:06:58 +0000 (17:06 -0300)]
Update image docs

6 years agoupdate web template to check for thpoff
Sam [Thu, 2 Aug 2018 07:38:44 +0000 (17:38 +1000)]
update web template to check for thpoff

6 years agoFEATURE: disable huge pages in PG, web and redis
Sam [Thu, 2 Aug 2018 07:00:20 +0000 (17:00 +1000)]
FEATURE: disable huge pages in PG, web and redis

6 years agoFEATURE: ability to turn off transparent huge pages on arbitrary programs
Sam [Thu, 2 Aug 2018 05:01:42 +0000 (15:01 +1000)]
FEATURE: ability to turn off transparent huge pages on arbitrary programs

6 years agoRevert "Add libicu-dev for charlock_holmes gem"
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.

6 years agoAdd tcmalloc as an optional allocator
Sam [Tue, 31 Jul 2018 02:16:41 +0000 (12:16 +1000)]
Add tcmalloc as an optional allocator

6 years agofixes prettier version at 1.14.0
Joffrey JAFFEUX [Mon, 30 Jul 2018 15:43:26 +0000 (11:43 -0400)]
fixes prettier version at 1.14.0

6 years agoMake launcher work with french locale (among others) (#395)
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.

6 years agoImproved Let's Encrypt email argument (#400)
Rishabh [Mon, 30 Jul 2018 00:14:44 +0000 (05:44 +0530)]
Improved Let's Encrypt email argument (#400)

6 years agoAdd libicu-dev for charlock_holmes gem
Gerhard Schlager [Thu, 26 Jul 2018 12:18:04 +0000 (14:18 +0200)]
Add libicu-dev for charlock_holmes gem

6 years agoUse github archive for ImageMagick instead.
Guo Xiang Tan [Tue, 24 Jul 2018 06:22:50 +0000 (14:22 +0800)]
Use github archive for ImageMagick instead.

6 years agoBump base image for launcher.
Guo Xiang Tan [Mon, 23 Jul 2018 03:45:37 +0000 (11:45 +0800)]
Bump base image for launcher.

6 years agoRemove replace commands that are no longer required in Imagemagick7.
Guo Xiang Tan [Wed, 18 Jul 2018 01:53:14 +0000 (09:53 +0800)]
Remove replace commands that are no longer required in Imagemagick7.

6 years agoUpdate imagemagick to ImageMagick7.
Guo Xiang Tan [Tue, 17 Jul 2018 06:30:50 +0000 (14:30 +0800)]
Update imagemagick to ImageMagick7.

6 years agoFEATURE: Add the doctor (#396)
Jay Pfaffman [Thu, 12 Jul 2018 16:05:48 +0000 (18:05 +0200)]
FEATURE: Add the doctor (#396)

6 years ago.gitignore show some love for emacs
Jay Pfaffman [Thu, 12 Jul 2018 06:36:25 +0000 (08:36 +0200)]
.gitignore show some love for emacs

Add `*~` and `#*#` to .gitignore for emacs temp/lock files

6 years agoAdd template that installs depencencies for MSSQL Server
Gerhard Schlager [Tue, 26 Jun 2018 15:45:16 +0000 (17:45 +0200)]
Add template that installs depencencies for MSSQL Server

6 years agoMerge pull request #394 from pfaffman/patch-1
Guo Xiang Tan [Mon, 25 Jun 2018 23:57:45 +0000 (07:57 +0800)]
Merge pull request #394 from pfaffman/patch-1

FIX: disk space check tests /shared

6 years agoInstall only sqlite3 gem for mbox import
Gerhard Schlager [Mon, 25 Jun 2018 11:38:12 +0000 (13:38 +0200)]
Install only sqlite3 gem for mbox import

6 years agoBump base image
Rafael dos Santos Silva [Fri, 15 Jun 2018 22:32:06 +0000 (19:32 -0300)]
Bump base image

6 years agoUpdate everything
Rafael dos Santos Silva [Wed, 13 Jun 2018 22:45:15 +0000 (19:45 -0300)]
Update everything

6 years agoBump base image
Rafael dos Santos Silva [Wed, 13 Jun 2018 15:56:45 +0000 (12:56 -0300)]
Bump base image

6 years agoBump discourse base image for fast swtich.
Guo Xiang Tan [Wed, 13 Jun 2018 08:36:57 +0000 (16:36 +0800)]
Bump discourse base image for fast swtich.

6 years agoAdd prettier to the base image
Rafael dos Santos Silva [Fri, 8 Jun 2018 14:06:02 +0000 (11:06 -0300)]
Add prettier to the base image

6 years agoRelease discourse:discourse_fast_switch:1.5.0.
Guo Xiang Tan [Wed, 6 Jun 2018 09:20:04 +0000 (17:20 +0800)]
Release discourse:discourse_fast_switch:1.5.0.

* Fast switch between Ruby 2.4.4 and Ruby 2.5.1

6 years agoUpdate pups repo to correct .git URL (#393)
Kim Gardner [Fri, 1 Jun 2018 03:22:42 +0000 (23:22 -0400)]
Update pups repo to correct .git URL (#393)

6 years agoFIX: disk space check tests /shared
Jay Pfaffman [Fri, 1 Jun 2018 02:29:09 +0000 (21:29 -0500)]
FIX: disk space check tests /shared

If `/shared` is not the same as `/`then the disk space test fails because it's testing the wrong partition.
For example, if `/` is too small you might create a separate partition for postgres so there will be enough room to update.

6 years agoUpdate latest jemalloc to 5.1.0
Rafael dos Santos Silva [Fri, 25 May 2018 20:33:22 +0000 (17:33 -0300)]
Update latest jemalloc to 5.1.0

6 years agoReduce log retention to 7 days out of the box
Sam [Tue, 1 May 2018 23:34:47 +0000 (09:34 +1000)]
Reduce log retention to 7 days out of the box
Remove notifempty so logs unconditionally rotate

6 years agoGenerate locale based on LANG before setting up Postgres.
Guo Xiang Tan [Thu, 26 Apr 2018 03:29:34 +0000 (11:29 +0800)]
Generate locale based on LANG before setting up Postgres.

6 years agoUpgrade libpng
Gerhard Schlager [Mon, 23 Apr 2018 10:06:40 +0000 (12:06 +0200)]
Upgrade libpng

6 years agoLegacy ImageMagick uses different folder name in archive
Gerhard Schlager [Mon, 23 Apr 2018 09:55:31 +0000 (11:55 +0200)]
Legacy ImageMagick uses different folder name in archive

6 years agoBumps ImageMagick version
Gerhard Schlager [Mon, 23 Apr 2018 08:51:52 +0000 (10:51 +0200)]
Bumps ImageMagick version

6 years agoPrompt user to remove old PG backup data cluster.
Guo Xiang Tan [Tue, 17 Apr 2018 05:55:02 +0000 (13:55 +0800)]
Prompt user to remove old PG backup data cluster.

6 years agoAdd instructions for users that do not want to upgrade at the moment.
Guo Xiang Tan [Tue, 17 Apr 2018 05:44:27 +0000 (13:44 +0800)]
Add instructions for users that do not want to upgrade at the moment.

6 years agoMerge pull request #392 from pfaffman/allow-old-awk
Jeff Atwood [Fri, 13 Apr 2018 23:40:44 +0000 (16:40 -0700)]
Merge pull request #392 from pfaffman/allow-old-awk

fix old awk, better error check, fix data.yml for 2container

6 years agofix old awk, better error check, fix data.yml for 2container
Jay Pfaffman [Fri, 13 Apr 2018 12:57:27 +0000 (05:57 -0700)]
fix old awk, better error check, fix data.yml for 2container

6 years agoPrint the actual amount of diskspace required.
Guo Xiang Tan [Thu, 12 Apr 2018 07:45:29 +0000 (15:45 +0800)]
Print the actual amount of diskspace required.

6 years agoAdd a disk space check before upgrading PostgreSQL.
Guo Xiang Tan [Thu, 12 Apr 2018 07:14:14 +0000 (15:14 +0800)]
Add a disk space check before upgrading PostgreSQL.

6 years agoMerge pull request #391 from pfaffman/master
Jeff Atwood [Mon, 9 Apr 2018 19:53:21 +0000 (12:53 -0700)]
Merge pull request #391 from pfaffman/master

FIX discourse-setup--better sanity checking

6 years agolauncher: launch containers by default with 512MB shmsize
Michael Brown [Fri, 6 Apr 2018 20:12:17 +0000 (16:12 -0400)]
launcher: launch containers by default with 512MB shmsize

6 years agoFIX discourse-setup--better sanity checking
Jay Pfaffman [Thu, 5 Apr 2018 22:59:32 +0000 (15:59 -0700)]
FIX discourse-setup--better sanity checking

6 years agoRemove TLS 1.0/1.1 support
Matt Palmer [Thu, 5 Apr 2018 04:52:16 +0000 (14:52 +1000)]
Remove TLS 1.0/1.1 support

https://meta.discourse.org/t/as-of-october-31-2018-microsoft-office-365-will-no-longer-support-tls-1-0-and-1-1/80479/11?u=mpalmer

6 years agoFix discourse_dev base image to work with PG 10.
Guo Xiang Tan [Wed, 4 Apr 2018 07:46:33 +0000 (15:46 +0800)]
Fix discourse_dev base image to work with PG 10.

6 years agoMore updates to the new postgres templates.
Guo Xiang Tan [Wed, 4 Apr 2018 06:44:50 +0000 (14:44 +0800)]
More updates to the new postgres templates.

6 years agoSwitch launcher to use PG 10.
Guo Xiang Tan [Wed, 4 Apr 2018 03:07:39 +0000 (11:07 +0800)]
Switch launcher to use PG 10.

6 years agoChange to a more reliable git source.
Guo Xiang Tan [Wed, 4 Apr 2018 01:58:51 +0000 (09:58 +0800)]
Change to a more reliable git source.

6 years agoRemove lockless and gperftools from base image.
Guo Xiang Tan [Wed, 4 Apr 2018 00:41:23 +0000 (08:41 +0800)]
Remove lockless and gperftools from base image.

6 years agoBump base image to PG 10.
Guo Xiang Tan [Wed, 4 Apr 2018 00:10:26 +0000 (08:10 +0800)]
Bump base image to PG 10.

6 years agoCopy postgres config folders as well.
Guo Xiang Tan [Tue, 3 Apr 2018 07:28:02 +0000 (15:28 +0800)]
Copy postgres config folders as well.