Elixir/phoenix development environment using Docker and Docker-compose. It uses Docker and Docker-compose, and builds an environment containing elixir, phoenix, brunch (and nodejs), postgresql.
-
By default, the existing environments are "dev" and "prod". Write the name of the environment you want to use in
config/env.txt
:echo dev > config/env.txt
-
For each exising environment, edit
config/ENV_NAME/env.sh
andconfig/ENV_NAME/docker-compose-override.yml
to your liking.
To create another environment, say, "test":
- create the directory
config/test
, - create the file
config/test/env.sh
, - create the file
config/test/docker-compose-override.sh
.
$ ./scripts/compose-build.sh
Create a new phoenix project if needed:
$ ./scripts/compose-run-cmd.sh mix phoenix.new . --app appName
Run scripts/compose-up.sh
to start the database and the server.