Giter Club home page Giter Club logo

devilbox-cli's People

Contributors

llaville avatar louisgab avatar thomasplevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

devilbox-cli's Issues

get mysql version error

this line in get_current_choice function is not valid for:
mariadb-*
percona-*

current=$(grep -Eo "^$config+[.[:digit:]]*" "$ENV_FILE" | sed "s/.*$config//g")

Run containers other than php, mysql, & httpd using the cli?

I'm finding this very useful but I've recently decided to add some additional services outside of the aforementioned list and I'm not finding a way to quickly start / stop these containers using this CLI.

After reviewing everything it looks like that's because these services are hardcoded into the run command.

I've taken a stab at rewriting the command to accommodate my requirement but I'm not super familiar with bash and ended up doing something kind of hacky to get it working to my liking.

My desire would be to be able to either specify which services I'd like to run via run and stop when calling the command, for example devilbox run -s http mysql php mailhog, or, alternatively, and what I've come up with, is to specify default services via a variable which will be used in favor of the currently hardcoded list if it exists. This would allow the existing default behavior to start my additional container if I decide I want an additional container. For example:

EXPORT DEVILBOX_SERVICES="php mysql httpd mailhog

When I run devilbox run it should start all of these services.

Here's the modifications I made to the compiled distribution script to make this latter option possible:

get_default_services() {
    if [ -n "$DEVILBOX_SERVICES" ]; then
        printf %s "${DEVILBOX_SERVICES}"
    else
        printf %s "httpd php mysql"
    fi
}

run_containers () {
    docker-compose up $(get_default_services)
}

run_containers_silent () {
    docker-compose up -d $(get_default_services)
}

If this seems like an acceptable solution I'd be happy to convert this into a useable PR and submit it for you.

Thanks,

Needs to allow for winpty in windows

Yes I know we should use at our own risk so just alerting to the fact that you can't do "devilbox e" in windows as it complains about winpty, and with winpty prefixed, it gives an error.

New feature: Restart command

I wrote a simple bash command to restart devilbox via the cli, devilbox stop && devilbox run -s. In the last week I've found myself regularly running this command.

If it seems generally useful I added a new command to the devilbox-cli to enable this in a single command:

devilbox restart    # Stop and restart containers.
devilbox restart -s # Stop and restart containers silently.

I've already committed the command to my fork and if it feels useful I'll submit it as a PR instead of working off my fork locally.

Here's the diff if you're interested: https://github.com/louisgab/devilbox-cli/compare/master...gocodebox:feature/restart-command?expand=1

However I accidentally committed after submitting #4 and I don't feel like rewriting history on my fork to get a clean diff without the changes made to #4

Thanks! This is a great tool and I just want to make it a little better for my personal needs

devilbox run in detached mode?

Hi,

It seems that devilbox run behaves like docker-compose up. Is it possible to change it to make it detached? As of docker-compose up -d

Is it possible to install it without npm ?

I am not fan of installing node and npm in my local system, that's why I use Devilbox.
Could you provide instructions for manual installation ?

Thank you in advance.

Feature: handle additional services with new `compose` command

Hello,

My suggestion, is to add a new command to handle other services/containers that we could add in docker-compose.overrride.yml easily.

We have to fix a coding standard to make it possible.
As introduced in devilbox project itself there is a compose/ folder with lot of docker-compose.overrride.yml-* files

Here are what my draft version is able to do :

dist/devilbox-cli.sh compose --containers will give the current stack containers : see DEVILBOX_CONTAINERS env var already available

i.e: with defaults containers

dist/devilbox-cli.sh compose --containers
[!] Stack Containers ready:
httpd
php
mysql

Now, if I want to launch httpd, php, mysql (default containers) plus mailhog, we have to run

dist/devilbox-cli.sh compose --containers=mailhog

And the four containers will be launch

When there are many others containers, we just have to enclose list in double quote like this

dist/devilbox-cli.sh compose --containers="mailhog portainer"

Hope you will like this new feature. Waiting your feedback to propose a PR.

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.