noelworden / atlas

Angling Atlas
0 stars 0 forks source link

Atlas

A sandboxing Elixir/Phoenix app built around a growing database of my favorite places in Colorado

Elixir CI

https://www.theanglingatlas.com


Spinning up project with Docker


run vs exec

When executing a command with docker-compose it can be run with either run or exec.

From the docs:

References: https://docs.docker.com/engine/reference/commandline/run/ https://docs.docker.com/engine/reference/commandline/exec/


Debugging

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


Testing

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>


Deploying to staging

Hosted by Gigalixir, docs can be found here

Project URL

Install Gigalixir CLI (with homebrew)

Log into Gigalixir

Verify login was successful

Setup git remote

Confirm remote

If desired, rename remote (which defaulted to gigalixir) to staging

Push to staging

Main vs Master


Executing mix Commands in Staging

The app is currently setup to be able to run mix commands on the staging environment

The run command

Using run and mix

Executing a migration

Seeding the database

Run IEx in remote app

SSL Troubleshooting