Shortcut your containers
This is a quickstarter for FrankenPHP, but can also be used with your custom docker environment.
- 🐳 Easy Docker setup for PHP projects
- ⏰ Saves time with helpful utilities
- 📦 Based on the original FrankenPHP image
- 🚀 Mercure Hub setup included
- 🛠️ Extendable to your needs for your project
- 🧰 Simple setup, easy extension
- Clone this repository and place it somewhere on your machine.
- Add
viktoras an alias:
alias viktor="/usr/bin/env bash <path>/viktorcli"Remember to reload your config with source ~/.zshrc or source ~/.bashrc, depending on your shell settings.
You are ready to go! 🖥️ Start your project with:
mkdir my-project
cd my-project
viktor initThis creates a .viktor directory in your project. More details about the .viktor directory.
Let's get started! 🚀
viktor up -dThis starts your containers and you can run your PHP project. Learn more about Docker setup.
Note: The default setup requires your
index.phpto be in the/public/directory relative to your project root, as most frameworks do.
viktor composer --version
viktor composer require ...viktor php -vInstall the latest Laravel into your project root. It also adds composer require barryvdh/laravel-debugbar --dev. I thought this was okay for every Laravel developer.
viktor laravel:installviktor artisan The container comes with Mercure. There is a helper that prepares Laravel for you. Make sure you do this only in an empty Laravel project.
Note: Since Laravel 11 (with the release of Reverb), you will be asked to install Reverb and JavaScript dependencies. You can say No to both. Currently, there is no way to run
php artisan install:broadcastingunattended. Learn more about Mercure setup.
viktor laravel:setup-mercure This repository contains a simple, not meant for production plugin as an example of how to work with Mercure.
viktor laravel:install-exampleTo remove this example, remove the package with composer composer remove pictus/laravel-livereaction and remove the repositories.pictus-laravel-mercure-example entry from your composer.json.
learn more about laravel example plugin