ATTENTION - fwd
is dead, long live kool
The FWD project has been discontinued in favour of our new solution - kool
. FWD has helped a lot for development teams to leverage Docker containers for local development. kool
now continues the same mission with more power and flexibility, plus it aims at making cloud native software development easy for individuals and teams, as well as has a strong maintainer team behind commited to make it grow in adoption and features.
The new kool tool is available and should be used for any new projects. Also please take a look at the https://blog.kool.dev and look for now to migrate from fwd
to kool
(article soon to be published).
Below you will find original fwd
README for the sake of historic value.
You need to have PHP 7.2+ installed in order to run fwd
.
curl -L "https://github.com/fireworkweb/fwd/raw/master/builds/fwd" -o /usr/local/bin/fwd
chmod +x /usr/local/bin/fwd
- Don't have and don't want to have PHP installed locally? Checkout and follow #21 for 100% Docker usage, thus not requiring PHP.
fwd
is great for running Docker Compose based projects. If you wanna use it in your project simply go to the root folder and use:
fwd install
This will create the .fwd
(environment variables) and docker-compose.yml
(services definitions) files in your project (you probably want to have them versioned).
You should review the variables and services in both files to best suit them to your project needs. The out-of-the-box configuration is great for PHP Laravel applications. Special attention to the environment variables flexibity (check out the section down this README).
To start the services:
fwd start
To stop the services:
fwd stop
Note: stopping will destroy all your containers, as they should all be ephemeral. Don't worry, important data should always be stored in volumes so they are kept amongst containers generations.
There is a bunch of commands delivered out of the box. You can check a list of all of them by running fwd
without other arguments to see the help message.
A couple of examples:
# PHP projects
fwd composer install # runs PHP Composer
fwd artisan migrate:fresh --seed # runs Laravel artisan CLI tool
# JS projects
fwd yarn install # runs Yarn install
fwd yarn dev # runs a package.json defined script
# Custom docker and docker-compose
fwd docker-compose logs -f http # tails the logs of the http service
fwd
is very flexible for you to tweak and change behaviors using environment variables. Variables like FWD_HTTP_PORT
that holds the port http
service will bind to, for example, can easily be changed in a number of ways, find the one that best fits your needs.
The precedence is as follows (from the highest to the lowest precedence):
- In-line/exported environment variables. (i.e
FWD_DEBUG=1 fwd ...
) .env
file in the current working directory (dotenv file format; usually not versioned in your project)..fwd
file in the current working directory (this file holds project specificfwd
settings that usually are versioned with the project).$HOME/.fwd
file; so you can have user-system specific changes easily across the board if needed.- Defaults
.fwd
distributed file bundled infwd
CLI; subject to changes with new versions.
The MIT License (MIT). Please see License File for more information.