Commit Graph

19 Commits

Author SHA1 Message Date
Donal McBreen
051556674f Minimise holding the deploy lock
If we get an error we'll only hold the deploy lock if it occurs while
trying to switch the running containers.

We'll also move tagging the latest image from when the image is pulled
to just before the container switch. This ensures that earlier errors
don't leave the hosts with an updated latest tag while still running the
older version.
2023-04-12 12:09:56 +01:00
Jeremy Daer
c137b38c87 Only redact the non-sensitive bits of build args and env vars.
* `-e [REDACTED]` → `-e SOME_SECRET=[REDACTED]`
* Replaces `Utils.redact` with `Utils.sensitive` to clarify that we're
  indicating redactability, not actually performing redaction.
* Redacts from YAML output, including `mrsk config` (fixes #96)
2023-04-05 09:45:28 -07:00
Donal McBreen
1ed4a37da2 Pull latest image tag, so we can identity it
`docker image ls` doesn't tell us what the latest deployed image is (e.g
if we've rolled back). Pull the latest image tag through to the server
so we can use it instead.
2023-03-23 14:39:32 +00:00
Samuel Sieg
ff88ee0b22 Allow setting the build context used for building 2023-03-04 10:59:52 +01:00
Samuel Sieg
b6934b0f41 Allow configuring the Dockerfile used for building 2023-03-04 10:59:23 +01:00
David Heinemeier Hansson
42b343436d Remove images of the same name before pulling a new one
Or you'll end up with untagged dupes.
2023-02-20 18:06:16 +01:00
David Heinemeier Hansson
8ec94f105c Tag images with service label so we can prune exclusively 2023-02-15 13:41:03 +01:00
David Heinemeier Hansson
c29a177a7a DRY the use of build options into one call 2023-02-15 13:23:14 +01:00
David Heinemeier Hansson
0433619518 Tag new builds with latest 2023-02-08 14:08:36 +01:00
Xavier Noria
539752e9bd Load with Zeitwerk 2023-02-03 22:45:12 +01:00
David Heinemeier Hansson
2ad135c237 No builder definition needed for native multiarch 2023-01-22 10:06:20 +01:00
David Heinemeier Hansson
9bb1fb7166 Move argumentize to Utils 2023-01-20 10:26:36 +01:00
David Heinemeier Hansson
454015b294 Reuse argumentize for build secrets 2023-01-20 10:24:23 +01:00
David Heinemeier Hansson
52fe8d358e Secrets come just as keys 2023-01-20 10:13:03 +01:00
David Heinemeier Hansson
a8779f7055 Simpler API
No need for redactions, since values aren't shared.
2023-01-20 10:07:17 +01:00
Nathan Anderson
e516f427cd Enable docker secrets in the builder as a more secure alternative to build args. 2023-01-18 17:35:36 -05:00
David Heinemeier Hansson
760a87fe06 Redact build args (since they are often tokens) 2023-01-15 13:15:14 +01:00
David Heinemeier Hansson
bb8a8d3399 Singular form 2023-01-15 12:31:10 +01:00
David Heinemeier Hansson
bafbde52fe Add build args 2023-01-15 10:35:17 +01:00