Giter Club home page Giter Club logo

phx-docker's Introduction

For setting up a docker development environment for Elixir & Phoenix.

  1. Set PHOENIX_DOCKER_GENERATOR to the path of this folder, for example if it's at $HOME/repos/phx-docker-gen, then put this in your .{z,bash}rc file: export PHOENIX_DOCKER_GENERATOR=$HOME/repos/phx-docker
  2. Then stick the file gen-phx in your path.
  3. Run gen-phx appname; appname should be underscore-case format. The script changes "hostname" from "localhost" to "db" in config/dev.exs; it needs to match the database service named in docker-compose.yml, in this case it is db.

For an existing project, follow steps 1 and 2 above and run gen-phx-existing inside the project folder. It will add the 3 Docker files (or overwrite them if they exist, adjust the script per your needs), set up the containers and run migrations.

https://96codes.dev/elixir-phoenix-development-using-docker-and-docker-compose

https://dev.to/hlappa/development-environment-for-elixir-phoenix-with-docker-and-docker-compose-2g17

Different than the above 2: https://medium.com/swlh/use-docker-to-create-an-elixir-phoenix-development-environment-e1a81def1d2e

See this for options to pass to mix phx.new: https://hexdocs.pm/phoenix/Mix.Tasks.Phx.New.html

phx-docker's People

Contributors

dyjjones avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.