lnikkila/ansible-phoenix

语言: Ruby

git: https://github.com/lnikkila/ansible-phoenix

使用Ansible开发和部署Phoenix应用程序!
Develop and deploy a Phoenix app using Ansible!
README.md (中文)

安西斯的凤凰角色

这个角色旨在尽可能轻量化,为您提供 仅限凤凰城的任务。

它很简单,可用于开发或生产 正确配置。尝试使用Vagrant!

为了获得更好的灵活性,您需要自己处理这些先决条件:

  • Node.js(如果使用早午餐)
  • PostgreSQL的
  • 获取应用程序的代码

有关处理这些内容的推荐方法,请参阅示例playbook。

如果您正在寻找能为您提供更多功能的角色,请查看 jacoelho.phoenix-应用。

安装

该角色可通过Ansible Galaxy获得。

添加到您的要求.yml:

- src: lnikkila.phoenix

用法

在您的剧本中加入角色:

- role: lnikkila.phoenix

没有必要以root身份运行整个角色。需要它的任务是 单独配置使用成为。

该角色为配置公开了一些变量。默认值应该是 最明智的:

# Whether to run a Brunch build and Ecto migrations.
# NOTE: Using Brunch requires Node.js.
phoenix_use_brunch: true
phoenix_use_ecto:   true

# Mix environment (propagates to Phoenix.)
phoenix_env: prod

# Server port.
phoenix_port: 4000

# Extra environment variables you want passed to Phoenix. Feel free to add your
# secret keys and such.
phoenix_env_vars: {}

# Path to the app.
phoenix_path: /var/www

# User for running the server.
phoenix_user:  phoenix
phoenix_group: phoenix

# Whether to create a system user. System users have the system flag set to true
# and have a home directory at {{ phoenix_path }}.
#
# Set this to false if you want to use an existing user. The system flag cannot
# be changed after a user has been created.
#
# Disable this also if you're running Vagrant and have Phoenix at /vagrant.
# The shared directory cannot host executables. That will cause problems with
# Mix as it installs dependencies there.
phoenix_system_user: true

# Command for running the server.
phoenix_bin: mix phoenix.server

许可证

Copyright (c) 2015, Leo Nikkilä

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

Phoenix role for Ansible Build status

This role aims to be as lightweight as possible, providing you with
Phoenix-specific tasks only.

It’s simple enough to be used in either development or production with the
proper configuration. Try it with Vagrant!

For better flexibility, you’re expected to handle these prerequisites yourself:

  • Elixir
  • Node.js (if using Brunch)
  • PostgreSQL
  • Fetching the code for your application

See the example playbook for a recommended way to handle these.

In case you’re looking for a role that does more for you, check out
jacoelho.phoenix-app.

Installation

The role is available through Ansible Galaxy.

Add to your requirements.yml:

- src: lnikkila.phoenix

Usage

Include the role in your playbook:

- role: lnikkila.phoenix

There’s no need to run the entire role as root. The tasks that require it are
configured separately to use become.

The role exposes a few variables for configuration. The defaults should be
mostly sensible:

# Whether to run a Brunch build and Ecto migrations.
# NOTE: Using Brunch requires Node.js.
phoenix_use_brunch: true
phoenix_use_ecto:   true

# Mix environment (propagates to Phoenix.)
phoenix_env: prod

# Server port.
phoenix_port: 4000

# Extra environment variables you want passed to Phoenix. Feel free to add your
# secret keys and such.
phoenix_env_vars: {}

# Path to the app.
phoenix_path: /var/www

# User for running the server.
phoenix_user:  phoenix
phoenix_group: phoenix

# Whether to create a system user. System users have the system flag set to true
# and have a home directory at {{ phoenix_path }}.
#
# Set this to false if you want to use an existing user. The system flag cannot
# be changed after a user has been created.
#
# Disable this also if you're running Vagrant and have Phoenix at /vagrant.
# The shared directory cannot host executables. That will cause problems with
# Mix as it installs dependencies there.
phoenix_system_user: true

# Command for running the server.
phoenix_bin: mix phoenix.server

Licence

Copyright (c) 2015, Leo Nikkilä

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.