fizzle-cli v1.0.5
Fizzle
(This is a WIP project, so it is not ready for use yet, however, feel free to try it out and submit issues with your feature requests!)
A Command Line utility to start local servers under the *.local domains using Docker, Traefik and mDNS (multi-cast DNS). It supports both HTTP and HTTPS.
Commands
npx fizzle-cli start
- Starts Traefik and the mDNS daemonnpx fizzle-cli stop
- Stops Traefik and the mDNS daemonnpx fizzle-cli up
- Starts your app in a docker container and connects it to the local Traefik network
What it does
Fizzle creates a Traefik container that acts as a reverse proxy for your local servers. The CLI will also generate a local certificate for you and configure Traefik to use it.
Traefik will then launch a global entrypoint on port 80 and 443. It will then listen for requests on the registered *.local domains and route them to the correct container.
The mDNS daemon is then launched to listen for DNS requests for the *.local domains and route them to your local machine on your network if they are registered (in your Fizzle Traefik docker network).
Upon running the up
command in a project directory, Fizzle will create a docker container for your app and connect it to your local Traefik network. The container is either created from your own Dockerfile (which must use the /app directory as the working directory) or from a Dockerfile that Fizzle generates for you.
The container is then started using the start script that you provided during the up command.
Output Example
npx fizzle-cli start
anywhere on your machine to:
- Create your local certificate
- Start Traefik
- Start the mDNS daemon
ā Fizzle CLI šŖ£āØ
ā
ā Using Local Docker host: docker-desktop
ā
ā Local certificate already exists, skipping...
ā
ā Traefik started!
ā
ā Done in 633ms
npx fizzle-cli up
in the root of your project directory.
ā Fizzle CLI šŖ£āØ
ā
ā Using Local Docker host: docker-desktop
ā
ā What is the name of your app?
ā example-express-app
ā
ā What is the command to start your app?
ā npm start
ā
ā What port does your app run on?
ā 8080
ā
ā Do you wish to enable TLS?
ā Yes
ā
ā Docker container started
ā
ā Your app is running at https://example-express-app.local
ā
ā Done in 14824ms