Skip to content

Instantly share code, notes, and snippets.

@erikvullings
Created August 11, 2017 09:30
Show Gist options
  • Save erikvullings/8e8d5ae026748681de8ddde90d835cde to your computer and use it in GitHub Desktop.
Save erikvullings/8e8d5ae026748681de8ddde90d835cde to your computer and use it in GitHub Desktop.
Starting a new phoenix application
# Phoenix, by default, uses a Postgres database, so start one via docker
docker pull postgres
# Expose it on port 8432
docker run -p 8432:5432 --name hello-postgres -e POSTGRES_PASSWORD=postgres -d postgres
# Install Erlang, Elixir, and now Phoenix
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
# Create a new Phoenix app
mix phx.new hello
# Edit config/dev.exs and update your hostname. Add a port (default is 5432, but I've mapped it to 8432)
# Create your database
mix ecto.create
# Run Phoenix
mix phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment