A mix phx.new wrapper that generates a new Phoenix app and basic development environment with Docker Compose and Livebook.
phx-docker-compose-new
requires a few programs on your system.
- Git version control system
- Docker (Docker Engine and Docker CLI client)
- Docker Compose
git version
docker --version
docker compose version
You can download phx-docker-compose-new
from Github.
git clone https://github.com/mnishiguchi/phx-docker-compose-new.git ~/.phx-docker-compose-new
Here is one way to make phx-docker-compose-new
available in your terminal.
alias phx-docker-compose-new=~/.phx-docker-compose-new/phx-docker-compose-new.sh
Create a Phoenix app running phx-docker-compose-new
. For possible options,
refer to Phoenix documentation.
phx-docker-compose-new sample_phx_app --no-assets --no-gettext --no-mailer
Change directory to your app and start Phoenix endpoint.
cd sample_phx_app
bin/start
Open the app from your browser:
- localhost:4000/ for your Phoenix application
- localhost:4000/dev/dashboard/ for Phoenix LiveDashboard
- localhost:8080/ for Livebook
Here are some other commands:
- Stop Phoenix endpoint with
bin/stop
- IEx into your running app with
bin/console
- Check logs with
bin/logs