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

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.

Comments
  • "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=
    
  • "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

  • 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?

  • 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

  •  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

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

  • 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

  • (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
    
  • 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

  • nginx error appearing when using

    nginx error appearing when using "local" env type

    I'm trying to build a container in the "local" reward env type and I'm running into this issue

    ERROR: The Compose file is invalid because:
    Service nginx has neither an image nor a build context specified. At least one must be provided.
    

    image

    The core folder contains a valid Dockerfile (Dockerfile.dev)

    Here is the .env file

    REWARD_ENV_NAME=e4
    REWARD_ENV_TYPE=local
    REWARD_WEB_ROOT=/
    
    TRAEFIK_DOMAIN=e4.test
    TRAEFIK_SUBDOMAIN=
    TRAEFIK_EXTRA_HOSTS=
    

    here is the .reward/reward-env.yml file

    version: "3.5"
    services:
      graphql:
        hostname: "{{ .reward_env_name }}-graphql"
        build:
          context: ./core
          dockerfile: Dockerfile.dev
        labels:
          - traefik.enable=true
          - traefik.http.routers.custom.tls=true
          - traefik.http.routers.custom.rule=Host(`{{ default "app" .traefik_subdomain }}.{{ default "custom.test" .traefik_domain }}`)
          - traefik.http.services.custom.loadbalancer.server.port=4000
          - traefik.docker.network={{ .reward_env_name }}_default
          - dev.reward.container.name=custom-container
          - dev.reward.environment.name={{ .reward_env_name }}
    

    I see on https://github.com/davidalger/m2demo/blob/master/.warden/warden-env.yml that an nginx service is defined. Do I always need to provide one by default?

    Thanks!

  • 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

  • Composer 1 being used instead of Composer 2

    Composer 1 being used instead of Composer 2

    Steps

    1. Clone Magento project
    2. Modify .env (optional)
    3. Import db
    4. Run reward bootstrap

    This was working fine with Composer 2 until I updated rewardenv, now whenever I start a project it appears that it uses Composer 1 to install the dependencies when Composer 2 is recommended.

    • Docker desktop with WSL2
    • Ubuntu 22.04
    • Magento version magento/magento-cloud-metapackage[2.4.1]

    Also, I've tried using sudo alternatives --config composer to select the version Composer, but when I run the bootstrap command, it uses Composer 1 again

    Screenshots

    Untitled

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

Jan 7, 2023
Ensi-local-ctl - ELC - orchestrator of development environments

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

Oct 13, 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

Dec 29, 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

Nov 2, 2022
ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run, exec, cp, logs, stop)
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

Dec 13, 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

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

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

Nov 9, 2022
fiber-air-docker development environment boilerplate, examples
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

Sep 14, 2022
Docker App Development & Command Practice
 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

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

Jan 2, 2023
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

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

Dec 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

Sep 24, 2022
CLI based tools to find the secrets in docker Images
CLI based tools to find the secrets in docker Images

docker-secrets CLI based tools to find the secrets in docker Images This tool use detect-secrets to find the secrets in the docker Image file system P

Mar 22, 2022
Explore Docker registries and manipulate Docker images!
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

Nov 25, 2022
Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.
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

Sep 23, 2022
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

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.

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

Jan 28, 2022