asdf plugin-add erlang asdf install erlang 21.1 asdf global erlang 21.1
Docker
docker-compose
erlang 21.1
elixir 1.13.1
phoenix 1.6.9
postgres 11
nodejs > 10
If you are on linux use ASDF https://awesomeopensource.com/project/asdf-vm/asdf
use asdf to install erlang
asdf plugin-add erlang asdf install erlang 21.1 asdf global erlang 21.1
asdf plugin-add elixir asdf install elixir 1.7.3 asdf global elixir 1.7.3
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
asdf plugin-add nodejs asdf install nodejs 10.13.0 asdf global nodejs 10.13.0
I typically run mine with something like that :
docker pull postgres:11.1 docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -v $HOME/tmp/docker-data/elixir_worksho/pg-data:/var/lib/postgresql/data --name postgres_elixir postgres:11.1
Warning
|
Utiliser git bash () pas le cmd windows () |
download and install https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe
Install elixir Msi https://repo.hex.pm/elixir-websetup.exe
run :
mix archive.install hex phx_new 1.4.0
The main problem about this issue on Windows Platform is seemingly coming from a proper maker. Which in the case is nmake coming along with Microsoft Visual Studio Build Tools (or Visual C++) Correction:
you can work with Chocolatey to get the adapted tools.
Chocolatey check this link [https://chocolatey.org/docs/installation] folllow steps for Installing Chocolatey chapter
Visual C++ Build Tools
choco install VisualCppBuildTools
(and follow steps). add C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin in your path
Install nodejs Msi https://nodejs.org/dist/v10.15.0/node-v10.15.0-x64.msi
No persistant data if you remove (rm) the container
docker pull postgres:11.1 docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 --name postgres_elixir postgres:11.1
Warning
|
Utiliser git bash () pas le cmd windows () |
I’ll present thing with VSCode
Install those plugin :
- vscode-elixir
- elixir snippets
mix new my_project
creates a project in myproject folder
mix phx.new my_phx_project
creates a phoenix project in myproject folder
and if postgres was running and listening on localhost
psql -h localhost -U postgres_user_change_me
let’s you connect to your database :D