Format a MicroSD card that is no larger than 32 MB. This must be formatted using FAT32 file format.
Download and save to SD Card:
(for mcp2515 controller like the PiCAN2)
fork (or clone) nerves_system_rpi3 locally into the parent directory of your project
edit mix.exs and change the nerves_system_rpi3 lines to point to your local one:
def system("rpi3"), do: [{:nerves_system_rpi3, path: "../nerves_system_rpi3", runtime: false}]
mix deps.get
mkdir config/rpi3 to set up a place to store some customized rpi configs
| #!/bin/bash | |
| export MIX_ENV=${MIX_ENV:-prod} | |
| if [ -f /.dockerenv ]; then | |
| # We are inside a docker container, so lets build a release | |
| if [ -n "${APP_NAME:+set}" ]; then | |
| echo ">>> BUILDING $APP_NAME <<<" | |
| mix release --env=$MIX_ENV --name=$APP_NAME | |
| else |
| #!/bin/bash | |
| echo ECS_CLUSTER=your_ecs_cluser_name > /etc/ecs/ecs.config | |
| INSTANCE=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
| hostname $INSTANCE | |
| sed -i.bak "s/\\(HOSTNAME=\\).*/\\1$INSTANCE/" /etc/sysconfig/network | |
| # https://aws.amazon.com/blogs/compute/using-amazon-efs-to-persist-data-from-amazon-ecs-containers/ | |
| yum -y install jq |
By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| # Complete rake tasks script for bash | |
| # Save it somewhere and then add | |
| # complete -C path/to/script -o default rake | |
| # to your ~/.bashrc | |
| # Xavier Shay (http://rhnh.net), combining work from | |
| # Francis Hwang ( http://fhwang.net/ ) - http://fhwang.net/rb/rake-complete.rb | |
| # Nicholas Seckar <nseckar@gmail.com> - http://www.webtypes.com/2006/03/31/rake-completion-script-that-handles-namespaces | |
| # Saimon Moore <saimon@webtypes.com> |