README.md

# dockerize_elixir

This project installs docker files into a new elixir project that sets up a
development environment. The development environment includes a database and
automatically runs your tests. Included are helper scripts to let you run `iex`
and various database tasks inside the containers.

This should work with plain elixir apps that use ecto, and phoenix apps.

# Example

```
mix archive.install hex dockerize_elixir
mix dockerize my_app
docker compose up --build
```

# Assumptions

1. Assumes you're using ecto & PostgreSQL

# Optional Setup

If you add [mix_test_watch](https://github.com/lpil/mix-test.watch) to your
project, then that will be used to run tests automatically when files change

# To-do:

1. Generate a prod ready Dockerfile, and script to build a releasable docker
   container.
2. Support other databases. I don't really use anything except PostgreSQL, so I'd
   love PR's for this.
3. Support apps that don't use ecto or database.

# Gotchas

1. If you run this in a phoenix app that uses their asset building stuff, the
   assets won't build due to [#5890](https://github.com/phoenixframework/phoenix/issues/5890). You'll have to make the changes in [#5891](https://github.com/phoenixframework/phoenix/pull/5891) to your generated config files.