Phoenix Base is the base Phoenix app template used at Flatstack. It's based on Elixir 1.5 and Phoenix 1.2.
bin/setup
- setup required libraries and stuffbin/quality
- runs code style check toolsbin/ci
- should be used in the CI or locallybin/build
- to build application releasebin/server
- to run server locallybin/docs
- to generate local docsbin/deploy [production]
- to deploy using EDeliverElixir v1.5 and Postgres should be installed.
Clone application as new project with original repository named "phoenix-base".
git clone git://github.com/fs/phoenix-base.git --origin phoenix-base [MY-NEW-PROJECT]
Create your new repo on GitHub and push master into it. Make sure master branch is tracking origin repo.
git remote add origin git@github.com:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master
Run setup script
bin/setup
Run test and quality suits to make sure all dependencies are satisfied and applications works correctly before making changes.
bin/ci
Run app
bin/server
Update README
Do not forget to update application README.md
file with detailed information based on the
existing template.
mv doc/README_TEMPLATE.md README.md
# update README.md
git commit -am "Update README.md"
Use ./bin/build
script to build Elixir application release.
You can use Elixir buildpack for Heroku to be deployed:
heroku create --addons=heroku-postgresql,sendgrid,newrelic,rollbar --remote staging phoenix-base-example --buildpack "https://github.com/HashNuke/heroku-buildpack-elixir.git"
heroku config:add HOST="phoenix-base-example.herokuapp.com"
git push staging master
heroku open
You can use EDeliver to deploy Erlang releases on remote hosts. Provide .deliver/config configuration first:
cp ~./.deliver/config.example ~/.deliver/config
./bin/deploy
All Elixir code should be written following Elixir Style Guide.
Please follow the next project structure:
lib
- application sourcesweb
- web related sourcesconfig
- app configurationspec
- application testsHound tests require phantomjs started in WebDriver mode:
phantomjs --wd
Phoenix Base was written and maintained by by Flatstack with the help of our contributors.