Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

A docker-compose based project to easily start an Elixir Phoenix Web Project.

Notifications You must be signed in to change notification settings

smartmetals/phoenix_quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix Docker Quickstart

A docker compose setup with Phoenix 1.3, Elixir 1.5, Erlang 20.0.

Install Docker: https://www.docker.com/get-docker

Initial setup:

git clone https://github.com/smartmetals/phoenix_quickstart
cd phoenix_quickstart
source functions.sh
phx-new myappname

Note that your app name must start with a letter and have only lowercase letters, numbers and underscore.

Answer yes to the questions about installing dependencies.

Open projects/myappname/config/dev.exs and change the db hostname: from localhost to "db". Do the same in projects/myappname/config/test.exs.

Note below commands use the sourced function dmix, not mix directly.

dmix ecto.create
dserver # docker-compose up

Browse: http://localhost:4000

If you start a new shell, source functions.sh again and run phx-init myappname.

Start a repl with diex. Run any command in the web container with drun.

Credit

Most of the work in this repo was originally done by others:

https://github.com/marcelocg/phoenix-docker https://github.com/rbeene/phoenix-with-docker

About

A docker-compose based project to easily start an Elixir Phoenix Web Project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages