Last active
May 23, 2017 23:26
-
-
Save yeongsheng-tan/36a89e4c6cf95c57f6387a4182122a88 to your computer and use it in GitHub Desktop.
Distillery release migration commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# distillery rel/config.exs sample content for linking up migration tasks | |
Path.join(["rel", "plugins", "*.exs"]) | |
|> Path.wildcard() | |
|> Enum.map(&Code.eval_file(&1)) | |
use Mix.Releases.Config, | |
# This sets the default release built by `mix release` | |
default_release: :my_app, | |
# This sets the default environment used by `mix release` | |
default_environment: Mix.env() | |
environment :prod do | |
set include_erts: true | |
set include_src: false | |
set cookie: :"<G,>[;G>bCk]9{YJA4ydOT8aarJBIi;F:oh:$<>~(DG7S03b3EzVr)~b`,%aV@<zi@" | |
set vm_args: "rel/vm.args" | |
end | |
release :my_app do | |
set version: current_version(:my_app) | |
set applications: [ | |
my_app: :permanent | |
] | |
set commands: [ | |
# Develop and have your my_db_migrate_script.sh script located in my_app/priv/commands/my_db_migrate_script.sh | |
"ecto.migrate": Path.join([:code.priv_dir(:my_app), "commands", "my_db_migrate_script.sh"]) | |
] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment