Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments.

Overview

Reward Logo

Reward

Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments. It makes possible to run multiple local environments simultaneously without port conflicts by utilizing common services proxying requests to the correct environment's containers.

Reward is written in Go and it supports Linux, macOS and Windows (and WSL2).

Reward was inspired by Warden. See the Acknowledgment section for more info.

Reward was created under the aegis of ITG Commerce.

Features

  • Traefik for SSL termination and routing/proxying requests into the correct containers.
  • Portainer for quick visibility into what's running inside the local Docker host.
  • Dnsmasq to serve DNS responses for *.test domains eliminating manual editing of /etc/hosts
  • An SSH tunnel for connecting from Sequel Pro or TablePlus into any one of multiple running database containers.
  • Reward issued wildcard SSL certificates for running https on all local development domains.
  • A common PHPMyAdmin (or optionally Adminer) container for database management.
  • An ElasticHQ container for the ability to manage the Elasticsearch Clusters.
  • Full support for Magento 1, Magento 2, PWA Studio, Laravel, Symfony 4, Shopware 6, Wordpress and more on all major operating systems
  • Ability to override, extend, or setup completely custom environment definitions on a per-project basis.

Installation

Installing Reward

Find out more: Installation

Initializing Wordpress

Initializing Wordpress

Find out more: Initializing Wordpress

Initializing Magento 2

Initializing Magento 2

Find out more: Initializing Magento 2

Contributing

All contributions to the Reward project are welcome: use-cases, documentation, code, patches, bug reports, feature requests, etc. Any and all contributions may be made by submitting Issues and Pull Requests here on Github.

Please note that by submitting a pull request or otherwise contributing to the Reward project, you warrant that each of your contributions is an original work and that you have full authority to grant rights to said contribution and by so doing you grant the owners of the Reward project, and those who receive the contribution directly or indirectly, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to make, have made, use, offer to sell, sell and import or otherwise dispose of the contributions alone or with the Reward project in its entirety.

License

This work is licensed under the MIT license. See LICENSE file for details.

Author Information

This project was started in 2021 by Janos Miko.

Acknowledgement

Reward was inspired by Warden and most of its functionalities are reused/rewritten in Reward, so HUGE thanks to David Alger and all the contributors for creating it.

Issues
  • "Could not connect to Amqp server" error during Magento 2 bootstrap on M1 Mac

    I am using reward to try and get a Magento 2 local environment running on my 16GB M1 Mac Mini. In the Docker Desktop settings I have allocated 8GB RAM and 4 CPUs. Docker Desktop is the "Apple Silicon" version.

    reward bootstrap exits with the following error (surplus whitespace removed):

    Could not connect to the Amqp Server.
    In InstallCommand.php line 274: Parameter validation failed
    

    Running the RabbitMQ container separately gives:

    % docker run rewardenv/rabbitmq:3.8
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    WARNING: 'docker-entrypoint.sh' generated/modified the RabbitMQ configuration file, which will no longer happen in 3.9 and later! (https://github.com/docker-library/rabbitmq/pull/424)
    
    Generated end result, for reference:
    ------------------------------------
    loopback_users.guest = false
    listeners.tcp.default = 5672
    ------------------------------------
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    

    For completeness, .env file is:

    REWARD_ENV_NAME=sa-local
    REWARD_ENV_TYPE=magento2
    REWARD_WEB_ROOT=/
    
    TRAEFIK_DOMAIN=sa-local.test
    TRAEFIK_SUBDOMAIN=
    TRAEFIK_EXTRA_HOSTS=
    
    REWARD_DB=1
    REWARD_ELASTICSEARCH=1
    REWARD_VARNISH=1
    REWARD_RABBITMQ=1
    REWARD_REDIS=1
    REWARD_MERCURE=0
    
    ELASTICSEARCH_VERSION=7.12
    MARIADB_VERSION=10.4
    NODE_VERSION=10
    PHP_VERSION=7.4
    RABBITMQ_VERSION=3.8
    REDIS_VERSION=6.0
    VARNISH_VERSION=6.5
    COMPOSER_VERSION=2
    
    REWARD_SYNC_IGNORE=
    
    REWARD_ALLURE=0
    REWARD_SELENIUM=0
    REWARD_SELENIUM_DEBUG=0
    REWARD_BLACKFIRE=0
    REWARD_SPLIT_SALES=0
    REWARD_SPLIT_CHECKOUT=0
    REWARD_TEST_DB=0
    REWARD_MAGEPACK=0
    
    BLACKFIRE_CLIENT_ID=
    BLACKFIRE_CLIENT_TOKEN=
    BLACKFIRE_SERVER_ID=
    BLACKFIRE_SERVER_TOKEN=
    
    XDEBUG_VERSION=
    
    bug 
    opened by smithi1 17
  • "Cannot connect to remote host" while trying to connect to DB with PHPStorm

    I tried connecting PHPStorm to a project DB like I did many other times with warden; I followed the guide but I keep getting the error "Cannot connect to remote host" while setting up the SSH Tunnel;

    I also tried connecting to it from the CLI: $ sudo ssh [email protected] -p 2222 [email protected]: Permission denied (publickey,keyboard-interactive).

    I can post a more verbose error message from the terminal if needed

    Am I missing some step here? All the other services work correctly, as well as PHPmyadmin

    opened by adexandros 12
  • Error: invalid number of endpoint URLs provided

    Error: invalid number of endpoint URLs provided

    I was originally trying to get my own Magento installation up and running but hit this same error: Error: invalid number of endpoint URLs provided So I tried a vanilla start (windows 11 Empty Magento 2 Project with bootstrap command) and hit this same error after running the reward bootstrap --with-sampledata command.

    I'm assuming I've missed something pretty obvious, I'm migrating from WinNMP, which is very hand holding compared to this haha. Willing to learn, just stuck, any ideas?

    opened by Chris-Kiddier 11
  • Enabling reward_wsl2_direct_mount in .reward.yml file slows down installation and every container operation

    Enabling reward_wsl2_direct_mount in .reward.yml file slows down installation and every container operation

    Tested this on WIndows 10 with WSL2 installed, Ubuntu 20.04:

    I have uncommented the flag reward_wsl2_direct_mount in the ~/.rewardw.yml file to leverage WSL2, however after setting up a env and running reward bootstrap, the whole installation process takes about ~50m, vs ~4m of normal installation without direct mount. Also after using reward shell and any command inside the container, even just bin/magento are super slow, as well as the site page load, while it works perfectly with a Mutagen installation. Moreover when exiting from a container with exit it produce the following error:

    /var/www/html$ exit
    exit
    Error: exit status 130
    Usage:
      reward shell [command] [flags]
    
    Flags:
          --container string   the container you want to get in (default "php-fpm")
      -h, --help               help for shell
    
    Global Flags:
          --app-dir string       app home directory (default "C:\\Users\\micro\\.reward")
      -c, --config string        config file (default "C:\\Users\\micro\\.reward.yml")
          --debug                enable debug mode (same as --log-level=debug)
          --disable-colors       disable colors in output
          --docker-host string   docker host (default "npipe:////./pipe/docker_engine")
          --log-level string     logging level (options: trace, debug, info, warning, error) (default "info")
          --wsl2-direct-mount    use direct mount in WSL2 instead of syncing
    
    INFO[2021-03-05T10:18:44Z] exit status 130
    

    I am not sure why this happens, just noticed while testing multiple site installations

    opened by adexandros 9
  •  ERROR  EACCES: permission denied, open '/var/www/html/magepack.config.js'

    ERROR EACCES: permission denied, open '/var/www/html/magepack.config.js'

    Hi @janosmiko ,

    I am getting the error ERROR EACCES: permission denied, open '/var/www/html/magepack.config.js' when trying to run the command reward env exec magepack generate outside of the shell, as it should be. I have installed the magepack module, set to 1 the configuration in the .env file, rebuild the environment and everything run smooth up until when the module needs to generate the magepack.config.js file; I know it's working ootb for warden and the configuration is almost identical here, am I missing something?

    thank you

    opened by adexandros 8
  • Laravel APP_KEY not updated after key generation

    Laravel APP_KEY not updated after key generation

    Hey!

    I created a new Laravel project from scrath with following the guide: https://rewardenv.readthedocs.io/en/latest/environments/initializing-laravel.html

    Step 5. Create an APP_KEY and add it to the .env file. Key generated successfully and I copied the generated key to the .env file (to the APP_KEY row)

    After that I regenerate the config cache with php artisan config:cache.

    and the application cache with php artisan cache:clear

    The application throws an error, the key not valid. Repeated a new key and it was the same.

    Issue: I check the config.php in the cache directory and an old key present here, the generate:key or the copy+paste not modified the key in the cached config file..

    opened by zoltan-nemeth-born 7
  • panic: runtime error: invalid memory address or nil pointer dereference

    panic: runtime error: invalid memory address or nil pointer dereference

    Szia @janosmiko !

    Frissen telepített Ubuntu 20.04, feltettem a Reward-ot és rendben ment is az első projekttel. A második projektet akartam indítani, azonban az env-init a következő hibát dobja és utána folyamatosan:

    reward env-init project2
    
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x61e271]
    
    goroutine 1 [running]:
    github.com/hashicorp/go-version.(*Version).String(0x0, 0xc0001b7800, 0x13)
    	/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/version.go:363 +0x51
    github.com/rewardenv/reward/cmd.init.1()
    	/home/runner/work/reward/reward/cmd/bootstrap.go:69 +0x86d
    

    A két projekt között kellett egy ssh kulcsot generálnom, de ezenkívül más lényeges változás nem történt. Van valami javaslatod, hogy mi lehet a gond?

    Köszönöm szépen, Zoli

    opened by RedSign77 6
  • (elementaryOS 6.1 - Ubuntu 20.04) Error: your operating system is not supported. Yet. :(

    (elementaryOS 6.1 - Ubuntu 20.04) Error: your operating system is not supported. Yet. :(

    Hi, I am trying to install Reward on elementaryOs 6.1, which is built on Ubuntu 20.04 (which the Reward documentation claims works). Is there some way to run reward install with a parameter to tell it to assume it is on Ubuntu 20.04?

    Here is my OS info if it helps:

    $ cat /etc/os-release
    NAME="elementary OS"
    VERSION="6.1 Jólnir"
    ID=elementary
    ID_LIKE=ubuntu
    PRETTY_NAME="elementary OS 6.1 Jólnir"
    LOGO=distributor-logo
    VERSION_ID="6.1"
    HOME_URL="https://elementary.io/"
    DOCUMENTATION_URL="https://elementary.io/docs/learning-the-basics"
    SUPPORT_URL="https://elementary.io/support"
    BUG_REPORT_URL="https://github.com/elementary/triage/issues/new"
    PRIVACY_POLICY_URL="https://elementary.io/privacy-policy"
    VERSION_CODENAME=jolnir
    UBUNTU_CODENAME=focal
    
    opened by OliverBeckwith 4
  • ngrok testing?

    ngrok testing?

    Hi, this rewardenv is great, but is there any way to test the local environment using ngrok? when I run the ngrok command ./ngrok http https://mywebsite.test and then I try to open the url provided by ngrok, then I am always getting '404 page not found'. Thanks so much

    opened by joseborngroup 4
  • Error response from daemon: path /home/adexandros/projects/test/.reward/nginx is mounted on / but it is not a shared mount.

    Error response from daemon: path /home/adexandros/projects/test/.reward/nginx is mounted on / but it is not a shared mount.

    Hi @janosmiko,

    I am setting up reward on a new device with WSL2 and using the native linux reward installation inside the host; everything looked good until I tried to initialise an environment for a test project, getting the following error: Error response from daemon: path /home/adexandros/projects/test/.reward/nginx is mounted on / but it is not a shared mount.

    nginx seems like the only container unable to start due to the above, do have any hint for this?

    thanks

    opened by adexandros 3
  • Magento 2: Multiple domain issue when env up

    Magento 2: Multiple domain issue when env up

    Hey @janosmiko !

    We have a multiple domain magento 2 project. We set up the environment with the stores.php configuration: https://rewardenv.readthedocs.io/en/latest/configuration/multipledomains.html?highlight=multiple%20domains#composer-autoload-php-file

    We follow the configuration steps and add all (7) domains: https://rewardenv.readthedocs.io/en/latest/configuration/multipledomains.html?highlight=multiple%20domains#multiple-domains

    When we start the environment with reward env up then the following error displayed:

    INFO[2021-09-16T09:54:54+02:00] Creating network...                          
    Creating network "project_default" with the default driver
    Creating project_elasticsearch_1 ... done
    Creating project_db_1            ... done
    Creating project_rabbitmq_1      ... done
    Creating project_redis_1         ... done
    Creating project_php-fpm_1       ... done
    Creating project_php-debug_1     ... done
    Creating project_nginx_1         ... done
    Creating project_varnish_1       ... done
    Error: yaml: line 276: mapping values are not allowed in this context
    Usage:
      reward env [flags]
    
    Flags:
      -h, --help   help for env
    
    Global Flags:
          --app-dir string       app home directory (default "/home/zoltan_nemeth/.reward")
      -c, --config string        config file (default "/home/zoltan_nemeth/.reward.yml")
          --debug                enable debug mode (same as --log-level=debug)
          --disable-colors       disable colors in output
          --docker-host string   docker host (default "unix:///var/run/docker.sock")
          --log-level string     logging level (options: trace, debug, info, warning, error) (default "info")
    
    INFO[2021-09-16T09:54:56+02:00] yaml: line 276: mapping values are not allowed in this context 
    

    ... end the containers aren't running.

    After this we run the reward env up -d command, then the containers starting without error:

    Starting project_db_1            ... done
    Starting project_rabbitmq_1      ... done
    Starting project_elasticsearch_1 ... done
    Starting project_redis_1         ... done
    Recreating project_php-fpm_1     ... done
    Recreating project_nginx_1       ... done
    Recreating project_php-debug_1   ... done
    Recreating project_varnish_1     ... done
    

    Can you have any idea why is not working?

    Thank you, Zoltán

    opened by RedSign77 3
Releases(v0.3.5-beta)
Vagrant is a tool for building and distributing development environments.

Vagrant Website: https://www.vagrantup.com/ Source: https://github.com/hashicorp/vagrant HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24

HashiCorp 23.9k Jun 24, 2022
Ensi-local-ctl - ELC - orchestrator of development environments

ELC - orchestrator of development environments With ELC you can: start a couple

MadridianFox 0 Apr 29, 2022
Example used to try a compose application with Docker Dev Environments

compose-dev-env Example used to try a Compose application with Docker Dev Environments. This example is based on the nginx-golang-mysql sample of awes

Docker Samples 64 Jun 16, 2022
A gh-cli extension for managing environments.

gh-environments A gh-cli extension for managing environments. Installation and Upgrades gh extension install chelnak/gh-environments gh extension upgr

Craig Gumbley 6 May 12, 2022
ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run, exec, cp, logs, stop)

English / 日本語 ecsk ECS + Task = ecsk ?? ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run

null 101 Jun 20, 2022
Docker-based remote code runner / 基于 Docker 的远程代码运行器

Docker-based remote code runner / 基于 Docker 的远程代码运行器

E99p1ant 35 Feb 22, 2022
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests

crud crud is a CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service docum

Piyush Jajoo 0 Nov 29, 2021
fiber-air-docker development environment boilerplate, examples

ON AIR! fiber-air-docker development environment boilerplate TODO on air 세션 준비 fiber 유저 준비 gorm 외래키 준비 아키텍쳐 참고 https://blog.puppyloper.com/menus/Golan

Hangyeol Shin 7 Mar 15, 2022
Docker App Development & Command Practice

Docker App Development & Command Practice What is Docker? A platform for building,running and shipping applications. in a consistent manner so if your

MD MOSTAIN BILLAH 32 Apr 7, 2022
Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

Open Service Mesh (OSM) Open Service Mesh (OSM) is a lightweight, extensible, Cloud Native service mesh that allows users to uniformly manage, secure,

Open Service Mesh 2.4k Jun 24, 2022
Composer is a simple process manager for dev environments.

Composer Composer is a simple service manager for dev environments. How to build/install it? To build composer under ./bin, run: make build To build

Thought Foundry, Inc. 2 May 12, 2022
A tool for managing complex enterprise Kubernetes environments as code.

kubecfg A tool for managing Kubernetes resources as code. kubecfg allows you to express the patterns across your infrastructure and reuse these powerf

null 61 Jun 14, 2022
Tool (in Go!) to compare and diff container and host environments. Dinosaur fun!

Compenv compare environments between containers, and host ??️ This is a simple tool to compare environments. This means the environment on your host v

Vanessasaurus 0 Jan 16, 2022
Explore Docker registries and manipulate Docker images!

L/S tags Utility and API to manipulate (analyze, synchronize and aggregate) images across different Docker registries. Example invocation $ lstags alp

Ivan Ilves 288 Jun 15, 2022
Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.

GIT-PIPE Hassle-free minimal CI/CD for git repos for docker-based projects. Features: zero configuration for repos by default automatic encrypted back

Aleksandr Baryshnikov 51 Oct 8, 2021
Tool to convert docker-compose files to set of simple docker commands

docker-decompose Tool to convert docker-compose files to set of simple docker commands. Install Use go get to install the latest version of the librar

Liri S 2 Apr 12, 2022
Go-http-server-docker - Simple sample server using docker and go

go-http-server-docker Simple sample webserver using docker and go.

null 0 Jan 8, 2022
Docker-hub-rate-limit - Show pulling rate status of Docker-hub

Docker-Hub Pull Rate Status This tool shows current status of docker hub pull ra

Tak 1 Jan 28, 2022
Dotnet-appsettings-env - Convert .NET appsettings.json file to Kubernetes, Docker and Docker-Compose environment variables

dotnet-appsettings-env Convert .NET appsettings.json file to Kubernetes, Docker

Daniel Dias de Assumpção 5 Jun 13, 2022