You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+48-30
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@
4
4
5
5
Simple deployment and server automation for Elixir.
6
6
7
-
**Bootleg** is a simple set of commands that attempt to simplify building and deploying elixir applications. The goal of the project is to provide an extensible framework that can support many different deploy scenarios with one common set of commands.
7
+
**Bootleg** is a simple set of commands that attempt to simplify building and deploying Elixir applications. The goal of the project is to provide an extensible framework that can support many different deployment scenarios with one common set of commands.
8
8
9
-
Out of the box, Bootleg provides remote build and remote server automation for your existing [Distillery](https://github.com/bitwalker/distillery) releases. Bootleg assumes your project is committed into a `git` repository and some of the build steps use this assumption
10
-
to handle code in some steps of the build process. If you are using an scm other than git, please consider contributing to Bootleg to
9
+
Out of the box, Bootleg provides remote build and remote server automation for your [Distillery](https://github.com/bitwalker/distillery) releases. Bootleg assumes your project is committed into a **git** repository and some of the build steps use this assumption
10
+
to handle code within the build process. If you are using another source control management (SCM) tool please consider contributing to Bootleg to
11
11
add additional support.
12
12
13
13
## Installation
14
14
15
-
```elixir
15
+
```
16
16
def deps do
17
-
[{:distillery, "~> 1.3",
18
-
{:bootleg, "~> 0.5"}]
17
+
[{:distillery, "~> 1.5",
18
+
{:bootleg, "~> 0.6"}]
19
19
end
20
20
```
21
21
@@ -24,7 +24,6 @@ end
24
24
In order to build your project, Bootleg requires that your build server be set up to compile
25
25
Elixir code. Make sure you have already installed Elixir on any build server you define.
26
26
27
-
28
27
## Quick Start
29
28
30
29
### Initialize your project
@@ -138,6 +137,7 @@ by Bootleg:
138
137
*`password` - ssh password
139
138
*`identity` - unencrypted private key file path (passphrases are not supported at this time)
140
139
*`port` - ssh port (default `22`)
140
+
*`replace_os_vars` - controls the `REPLACE_OS_VARS` environment variable used by Distillery for release configuration (default `true`)
141
141
142
142
#### Examples
143
143
@@ -395,29 +395,50 @@ end
395
395
396
396
## Phoenix Support
397
397
398
-
Bootleg builds elixir apps, if your application has extra steps required make use of the hooks
398
+
If your application has extra steps required, you may make use of the hooks
399
399
system to add additional functionality. A common case is for building assets for Phoenix
400
-
applications. To build phoenix assets during your build, include the additional package
401
-
`bootleg_phoenix` to your `deps` list. This will automatically perform the additional steps required
402
-
for building phoenix releases.
400
+
applications.
401
+
402
+
### Using the bootleg_phoenix package
403
+
404
+
To run these steps automatically you may include the additional package
405
+
`bootleg_phoenix` in your `deps` list. This package provides the build hook commands required to build most Phoenix releases.
403
406
404
407
```elixir
405
408
# mix.exs
406
409
defdepsdo
407
-
[{:distillery, "~> 1.3"},
408
-
{:bootleg, "~> 0.5"},
409
-
{:bootleg_phoenix, "~> 0.1"}]
410
+
[{:distillery, "~> 1.5"},
411
+
{:bootleg, "~> 0.6"},
412
+
{:bootleg_phoenix, "~> 0.2"}]
410
413
end
411
414
```
412
415
413
-
For more about `bootleg_phoenix` see: https://github.com/labzero/bootleg_phoenix
416
+
See also: [labzero/bootleg_phoenix](https://github.com/labzero/bootleg_phoenix).
414
417
415
-
##Sharing Tasks
418
+
### Using your own deploy configuration and hooks
416
419
417
-
Sharing is a good thing. We love to share, especially awesome code we write. Bootleg supports loading
418
-
tasks from packages in a manner very similar to `Mix.Task`. Just define your module under `Bootleg.Tasks`,
419
-
`use Bootleg.Task` and pass it a block of Bootleg DSL. The contents will be discovered and executed
420
-
automatically at launch.
420
+
Similar to how `bootleg_phoenix` is implemented, you can make use of the hooks system to run some commands on the build server around compile time.
421
+
422
+
```elixir
423
+
task :phoenix_digestdo
424
+
remote :builddo
425
+
"npm install"
426
+
"./node_modules/brunch/bin/brunch b -p"
427
+
"MIX_ENV=prod mix phoenix.digest"
428
+
end
429
+
UI.info"Phoenix asset digest generated"
430
+
end
431
+
432
+
after_task :compile, :phoenix_digest
433
+
```
434
+
435
+
436
+
## Task Providers
437
+
438
+
Sharing is a good thing. Bootleg supports loading
439
+
tasks from packages in a manner very similar to `Mix.Task`.
440
+
441
+
You can create and share custom tasks by namespacing a module under `Bootleg.Tasks` and passing a block of Bootleg DSL:
421
442
422
443
```elixir
423
444
defmoduleBootleg.Tasks.Foodo
@@ -431,30 +452,27 @@ defmodule Bootleg.Tasks.Foo do
431
452
end
432
453
```
433
454
434
-
See `Bootleg.Task` for more details.
455
+
See also: [Bootleg.Task](https://hexdocs.pm/bootleg/Bootleg.Task.html#content) for additional examples.
435
456
436
457
## Help
437
458
438
-
If something goes wrong, retry with the `--verbose` option.
439
459
For detailed information about the Bootleg commands and their options, try `mix bootleg help <command>`.
440
460
461
+
We're usually around on Slack where you can find us on [elixir-lang's #bootleg channel](http://elixir-lang.slack.com/messages/bootleg/) if you have any questions.
462
+
441
463
-----
442
464
443
465
## Acknowledgments
444
466
445
467
Bootleg makes heavy use of the [bitcrowd/SSHKit.ex](https://github.com/bitcrowd/sshkit.ex)
446
-
library under the hood. We would like to acknowledge the effort from the bitcrowd team that went into
447
-
creating SSHKit.ex as well as for them prioritizing our requests and providing a chance to collaborate
448
-
on ideas for both the SSHKit.ex and Bootleg projects.
468
+
library under the hood. We are very appreciative of the efforts of the bitcrowd team for both creating SSHKit.ex and being so attentive to our requests. We're also grateful for the opportunity to collaborate
469
+
on ideas for both projects!
449
470
450
471
## Contributing
451
472
452
-
We welcome everyone to contribute to Bootleg and help us tackle existing issues!
453
-
454
-
Use the [issue tracker][issues] for bug reports or feature requests.
455
-
Open a [pull request][pulls] when you are ready to contribute.
473
+
We welcome all contributions to Bootleg, whether they're improving the documentation, implementing features, reporting issues or suggesting new features.
456
474
457
-
If you are planning to contribute documentation, please check
475
+
If you'd like to contribute documentation, please check
458
476
[the best practices for writing documentation][writing-docs].
0 commit comments