Giter VIP home page Giter VIP logo

dev-stack's Introduction

Dev stack

Bash script for ease development built on top of docker and docker-compose.

You can watch showcase video on youtube ▶️.

Install

Add bin/dev-stack.sh to your $PATH, ideally as dev shortcut, something like ln -s /path/to/solcloud/dev-stack/bin/dev-stack.sh /bin/dev.

Activation

Start containers by running dev up -v in project working directory. If project don't have .dev-config file, run dev init to create one and edit as required. To stop containers run dev down.

Config

Only required variable for .dev-config is PPROJECT_NAME. All others variable are optional, but if you do not specify them they fallback to default values. For example for this .dev-config file

PROJECT_NAME=my_project

actual base variables will be these behind scene:

PROJECT_NAME=my_project
PREFIX=solcloud_
PHP_VERSION=7.4
DOCUMENT_ROOT=
BASE_IMAGE=solcloud/php:${PHP_VERSION}

so if you want to use different BASE_IMAGE and do not want to use default solcloud_ prefix with preconfigured services you can use for example this .dev-config file:

PROJECT_NAME=my_project
PREFIX=my_prefix_
BASE_IMAGE=php:8.1.3-apache

If BASE_IMAGE is not enough and you want absolute image control you can provide COMPOSE_CONTEXT variable with path to docker-compose build context folder.

Default COMPOSE_CONTEXT allows expanding BASE_IMAGE for current project using EXTRA_RUN_CMD_${1-7} variables. For example installing ffmpeg for current project.

PROJECT_NAME=my_project
EXTRA_RUN_CMD_1="apt-get update && apt-get install -y ffmpeg"
EXTRA_RUN_CMD_2="echo dev-stack is awesome"

Commands

  • usage: dev
  • start dev up
  • stop dev down
  • status: dev status
  • webserver cli: dev ws
  • composer: dev composer
  • PHPStan: dev stan
  • PHPUnit: dev unit
  • php cli: dev php
  • worker start (run.php): dev worker
  • Xdebug default enable: dev xdebug
  • Xdebug cli one shot: dev debug script.php

dev-stack's People

Contributors

solcloud avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.