Connect to an EC2 Instance to Seed Food Trucks
marka2g opened this issue · 0 comments
marka2g commented
Once the dynamic_private_key.pem
key has been ssh-add
ed and the currently running instance's IP has been written to your local known_hosts
file, use the DOCKER_HOST
env var to connect to an iex
session.
example:
$
ssh-add ./environments/production/dynamic_private_key.pem
$
ssh-keyscan -H 54.193.68.139 >> ~/.ssh/known_hosts
connect to an iex>
REPL
$
DOCKER_HOST=ssh://ec2-user@ec2-54-193-68-139..eu-west-1.compute.amazonaws.com iex -S mix
and seed some data
iex> BellyBot.GlobalSetup.seed_food_trucks() # check the food truck count iex> BellyBot.FoodTrucks.list_food_trucks() |> Enum.count()
ISSUE:
The data gets seeded but is not showing up in the application. Perhaps the docker instance and volume are not communicating? More investigation needed.