- nodejs 14 from nodesources.com
- elixir 1.10 from ubuntu repos
- erlang/OTP 22 from ubuntu repos
- phoenix 1.5.8 cli tool
- docker 20.10 from docker
- docker-compose 1.29 from docker
- mix
- mariadb 10 from official dockerhub
- mailhog from official dockerhub
I wanted to have consistency between environments when I move back and forth between my laptop and desktop and was tired of forgetting little things or missing steps in a big markdown file I was maintaining.
I format & reinstall my workstation & laptop OS with each distribution upgrade and had to recently replace my laptop under warranty so having a scripted installation of my dev environment was overdue. I've experienced the pain, dealt with it, & felt it'd be helpful for others to avoid the pain I was going through by sharing the environment setup makefile I created.
- Ubuntu 20.10 (tested on desktop, laptop, then replacement laptop)
- make
This is using remotely downloaded, 3rd party scripts from nodesources.com and using 3rd party PGP repos. You're responsible for the security of your app and infrastructure. Read over the Makefile before you type in your sudo password and if you're not feeling comfortable, don't do it. I'm using this for my own dev environment but no warranty or guarantee is provided or implied.
These are reputable 3rd parties but with great power comes great responsibility. Do your homework if you're using this in a business context, for sure.
These were copy/pasted from a private repo. I'm confident in the make setup-dev-env
step but make start
depends on you sorting out how to install the phoenix app in an existing folder. Rough steps are outlined here.
- Create folder, copy
Makefile
anddocker-compose.yml
files over sudo apt-get install build-essential
(for make, and some packages need to build binaries)make setup-dev-env
(will install elixir, node, npm, erlang, docker, docker-compose, mix, phoenix)- generate phoenix project in project folder with
--database mysql
flag make start
(will install backend/frontend deps, deploy docker stack, create db, run migrations, and start phoenix app with live-reload)- Go to http://localhost:4000 to see your phoenix webapp
- Go to http://localhost:8080 for phpmyadmin db administration. user: root, pass: password
- Go to http://localhost:8025 for mailhog web ui. Can test & monitor e-mails sent by your app.