This package is abandoned and no longer maintained. No replacement package was suggested.

Tool for simple docker based environments for Laravel applications.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 21

Watchers: 3

Forks: 17

Open Issues: 2

Type:application

v1.0.3 2020-07-13 19:22 UTC

README

fireworkweb/fwd

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.

GitHub Workflow Status codecov

Installation & Requirements

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

Getting started

Use in a new project

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).

Simple usage

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.

Other commands

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

Environment variables

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):

  1. In-line/exported environment variables. (i.e FWD_DEBUG=1 fwd ...)
  2. .env file in the current working directory (dotenv file format; usually not versioned in your project).
  3. .fwd file in the current working directory (this file holds project specific fwd settings that usually are versioned with the project).
  4. $HOME/.fwd file; so you can have user-system specific changes easily across the board if needed.
  5. Defaults .fwd distributed file bundled in fwd CLI; subject to changes with new versions.

License

The MIT License (MIT). Please see License File for more information.