Coder Social home page Coder Social logo

dev's People

Contributors

axia-wish avatar lhuhn-wish avatar optix2000 avatar svrana avatar

Stargazers

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

Watchers

 avatar  avatar

dev's Issues

Add build dependency to .dev.yaml

If you use an image that is built on top of another one it would be nice to be able to build it as part of the dependency checking step.

One way to do it:

i.e.,
projects:
foo:
docker_compose_files: [ "docker-compose.yaml"]
depends_on: ["bar"]

builds:
bar:
docker_file: ["Dockerfile.bar"]

dev foo up would then run docker build -f Dockfile.bar before attemping to bring up foo.

One other way might be to forgo 'builds' altogether and focus and instead focus on commands.

i.e.,

commands:
bar:
cmd: 'docker build -f Dockerfile.bar'

Both of these suggestions need flushing out..

Include example config file

To help document how the project can be configured.

Make it part of a test so there's some coverage there

Default help not helpful when default configuration finds nothing

When you run dev and it finds no projects it shows a one-liner about the program. Typically this would show all the commands and command flags, but since there are no commands at this point, the output is sparse. Would be nice to say that no projects were found and either to move to a directory containing docker-compose.yml files, setup a link from ~/.dev.yaml to a project config, etc.

Support docker-compose prefixes

docker-compose adds a prefix to all containers it creates. By default this prefix is the directory name of the first docker-compose file specified with -f flag (need to verify). This can be overriden with the -p flag or with the environment variable COMPOSE_PROJECT_NAME. Unfortunately it cannot be the empty string so some support has to be added to dev to get the tool to work at all, but it would be nice if projects could specify the prefix. Will have to be careful how this will work when multiple compose files are used (as is likely with this tool).

Use of relative paths in 'sh' command fails with the use of multiple dev config files

dev attempts to map the commands entered to their locations on the container. This is done by assuming that .dev.yaml is the root of the volume you have mapped in. This breaks down when you specify multiple config files. With multiple config files, the location of the first .dev.yaml is used even though the sh command could be running for a project in a subsquent dev yaml.

Support docker-compose.yaml files

Currently searching is performed only for docker-compose.yml files, be nice to support them both as they are both supported by docker-compose.

Add CI

Build on commit in all branches

Add ability to use more than one configuration file

If you have projects in different repositories you may want to use this tool to coordinate their usage together. While this is possible with one configuration file, it would lead to things being defined in the wrong place or duplicated.

How about $DEV_CONFIG="/Project/foo/.dev.yaml,"/Project/bar/.dev.yaml"

dev would merge all the configs into one. dependencies in foo/.dev.yaml should be able to depend on aspects of bar/.dev.yaml and vice versa.

Add support for external networks

It's possible to specify an "external" network with docker-compose. Compose will then assume the network exists and provided that it does exist, allow you to use it like you would any other network. Some projects may want to share an "external" network. If dev could create these networks itself and ensure they exist before bringing the containers up, it would really simplify things.

Projects should be able to say they "depend" on a specific network and it will be created/modified as dictated in the configuration.

Unable to down non project containers

When dev {project} down is run only the project container is shut down. Any other containers listed in the docker-compose files for the project are not brought down. This was intentional b/c dev doesn't really know the relationship between all the projects. Once issue #4 is resolved, flags can be added to the 'down' command to shut down all shared dependencies (probably should result in a warning that other dependent projects will also be shu down).

Add container sub-commands to the build command

Especially if you're using more than one docker file, it would be nice to have an easy way to build a particular container instead of rebuilding them all.

i.e., Say project foo relies on container nginx which i'd like to modify. It would be nice to do this:

dev foo build nginx

What i do now is run DEV_CONFIG=debug dev build foo and then ctl-c as soon as I see the build start and take a look at the logs to see the exact docker-compose invocation. Then I copy that and add 'nginx' at the end of it. After building i just run dev foo up to get all the containers to restart. It's not horrible, but could be made easier by adding all the container dependencies as sub-commands.

Add dependencies

Projects should be able to define a list of dependencies. These dependencies could be on a container registry (#2) an external network (#3) or another docker-compose project.

Registries would only be needed at 'up' time, so login should only happen then, but other dependencies may have different requirements.

Add the ability to define sh/exec commands

For example, it might be nice to have a 'dev python' command which runs 'dev sh python foo.py'. Adding code for each of these cases shouldn't be necessary. Add the ability to define these shortcuts globally or per-project in the configuration file.

I'm thinking that a command defined outside of the project would apply to all projects, i.e., in the case above, dev projectname python.

Possible configuration (needs work)

sh_shortcuts: {
   "python": "/home/app/.virtualenv/bin/python",
}

Auto up

If a user performs dev {project} sh command and the project container is not up, bring it up automatically

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.