Git Product home page Git Product logo

muss's People

Contributors

corbanr avatar djbender avatar jgramoll avatar phallstrom avatar raybrownco avatar viplezer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

muss's Issues

muss cp

Like docker cp to simplify getting files into/out of containers?

Show what process is occupying ports we want to use

to help people debug.
This would probably involve shelling out to lsof and/or ps and might be different for mac vs linux.
If you have another process using *:port docker will fail instantly when it can't bind to the port.
However, if you have a process using 127.0.0.1:port docker will work and then when you try to connect to lvh.me it will use the process specifically sitting on 127.0.0.1:port (it will go to docker only if there is no conflict).
This situation is much more confusing than "docker won't start".

Console commands

We could define common commands in module definitions.

Then you could do muss console psql (or muss console db or whatever you want to call it)
instead of muss run postgres psql or psql -h $dockerhost -p $exposedport -U $whatuserisit

If we used this instead of using psql directly then you wouldn't need to expose global ports and could avoid port conflicts that come from running too many projects.

Allow secret_commands to specify an unless or override command

For secret_commands we could define a command in the config that would allow for disabling the fetching of the secret.

As an example, it could simplify entrypoints if we could tell muss not to set a secret that is already configured in .env*.local instead of getting the secret under a different name and making the entrypoint have to decide whether or not to set it.

vault:
    # unless? override? local override?
    # unless would just not set it... override would set it?
    # maybe both?
   unless: [sh, -c, 'grep -E "^$1=" ${2:-.env*.local}', --]

Add discoverable docs

instead of having to add stuff to a README
it would be nice to add "help only" subcommands that have all that info
(like module_file definitions, available configuration options, etc)
and just put those commands in the README so that people can use muss to discover project options.

Customizable warnings

With a rails app you might want to put binding.pry in a controller and then muss attach web
but that's useless if you are using passenger since passenger doesn't pass the pty...
so while you can document that in a README, it could be useful to configure in the project that muss attach web should warn if "puma isn't configured".

muss "do" command for arbitrary tasks?

do_commands:
  docs: muss run something-to-generate docs
  pg_dump: muss run postgres env PGDATABASE=cluster3 pg_dump -h postgres -U postgres > tmp/muss.dumpall.sql
  pg_restore: muss exec postgres psql -h localhost -U get_smart -d postgres -f - < tmp/muss.dumpall.sql

Not sure about the command syntax though... do we put muss run in front of everything for maximum flexibility? or assume that commands would be run in a given container?
Then the do commands would be discoverable through muss help.

status command

Simply runs status.exec once, then add options for --wait (to wait until it exits zero) and maybe a --forever option to work just like it does in up.

Add reset commands

we could define in module definitions some commands to reset things, .e.g.

reset:
  testdb: "muss run test bash -c 'dropdb testdbname && createdb testdbname && bin/rake db:extensions db:structure:load RAILS_ENV=test'"

so that muss reset testdb would get people on their way faster and easier than down, drop a docker volume, up or other incantations.
other useful things could be caches, dev db, dynamodb-local, runtime dependencies, etc

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.