https://www.theanglingatlas.com
docker-compose build
docker-compose up
docker-compose exec web mix ecto.setup
seeds.exs
file is executed in the ecto.setup
mix
command, in the steps abovedocker-compose exec web mix run priv/repo/seeds.exs
run
vs exec
When executing a command with docker-compose
it can be run with either run
or exec
.
From the docs:
run
command first creates a writeable container layer over the specified image, and then starts
it using the specified command
run
, adding the --rm
flag will automatically remove the container when the command is finishedexec
command runs a new command in a running containerReferences: https://docs.docker.com/engine/reference/commandline/run/ https://docs.docker.com/engine/reference/commandline/exec/
With the project running on Docker, the standard iex -S mix
will not work to spin up an iEX console. An updated command, that works with Docker is:
docker-compose exec web iex -S mix
This command will maintain history from one iEX shell to another:
docker-compose exec web iex --erl "-kernel shell_history enabled" -S mix
With the project running on Docker tests can be run with:
docker-compose exec web mix test
To run only a specific test file:
docker-compose exec web mix test test/<path to file>
To run only a specific test within a test file:
docker-compose exec web mix test test/<path to file>:<test line number>
gigalixir help
is also very detailedbrew tap gigalixir/brew && brew install gigalixir
gigalixir login
gigalixir account
gigalixir git:remote atlas
git remote -v
gigalixir
) to staging
git remote rename gigalixir staging
git push staging <branch name>:master
main
, but Gigalixir is expecting it to be named master
main
to staging, it cannot be done with the shorthand:
git push staging master
git push staging main:master
mix
Commands in Stagingrun
commandgigalixir run ...
run
and mix
mix
command available locally can be executing on staging utilizing run
gigalixir run mix <command here>
gigalixir run mix ecto.migrate
gigalixir logs
gigalixir run -- mix run priv/repo/seeds.exs
gigalixir ps:remote_console
gigalixir open
www
domaingigalixir domains:add www.theanglingatlas.com
www
domain points to theanglingatlas.com
as a CNAME
via name.com