{"id":18624236,"url":"https://github.com/wish/dev","last_synced_at":"2025-04-11T03:32:16.177Z","repository":{"id":36204399,"uuid":"186681848","full_name":"wish/dev","owner":"wish","description":"docker-compose wrapper for development environments","archived":false,"fork":false,"pushed_at":"2023-08-15T20:19:19.000Z","size":4956,"stargazers_count":15,"open_issues_count":6,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T00:01:57.965Z","etag":null,"topics":["docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-14T18:54:02.000Z","updated_at":"2024-01-02T08:01:51.000Z","dependencies_parsed_at":"2024-06-19T01:39:19.310Z","dependency_job_id":"590ff679-5764-4bb8-95e6-4d4dd73165ce","html_url":"https://github.com/wish/dev","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wish%2Fdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wish%2Fdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wish%2Fdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wish%2Fdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wish","download_url":"https://codeload.github.com/wish/dev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335540,"owners_count":21086611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose"],"created_at":"2024-11-07T04:28:00.694Z","updated_at":"2025-04-11T03:32:11.163Z","avatar_url":"https://github.com/wish.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dev  ![codecov][1] [![Build Status](https://travis-ci.org/wish/dev.svg?branch=master)](https://travis-ci.org/wish/dev) [![Go Report Card](https://goreportcard.com/badge/github.com/wish/dev)](https://goreportcard.com/report/github.com/wish/dev)\n\ndev is a command line tool that wraps [Docker Compose](https://docs.docker.com/compose/) to enable shared resources\nfor an ideal development environment.\n\n\n# Table of Contents\n- [Background](#background)\n- [Goals](#goals)\n- [Installing](#installing)\n  * [Ubuntu](#ubuntu)\n  * [OSX](#osx)\n- [Building](#Building)\n- [Configuration](#Configuration)\n  * [.dev.yml](#.dev.yaml)\n- [{Project} Commands](#project-commands)\n  * [build](#build)\n  * [ps](#ps)\n  * [up](#up)\n  * [down](#down)\n  * [sh](#sh)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n# Background\n\nVersions up to 2.1 of the docker-compose configuration file had a convenient\nway to share configuration across docker-compose files using the\n[extends](https://docs.docker.com/compose/extends/#extending-services) keyword.\nFor those wishing to adopt later versions of the configuration, the loss of the\nextends keyword has been [problematic](https://github.com/moby/moby/issues/31101).\nFor some, the ability to specify multiple configurations with '-f' flag to\ndocker-compose is workable. Starting with version 3.4 another option is to\nuse [extension fields](https://docs.docker.com/compose/compose-file/#extension-fields).\n\nIf you find the above extensions insufficient for your development container\nneeds, you might find this project interesting.\n\n\n# Goals\n\n * Support sharing of docker-compose configuration across projects\n * Support sharing of networks across projects (i.e., manage creation of 'external' networks directly)\n * Support authentication with private container repositories\n * Support dependencies between projects, networks and registries\n\n\n# Installing\n\nBinaries available for linux and and osx on the [releases](https://github.com/wish/dev/releases) page.\n\n## Ubuntu\n\nDev is bundled as a deb and made available as a ppa on launchpad.\n\n\n```bash\nsudo add-apt-repository ppa:wishlaunchpad/ppa\nsudo apt install dev\n```\n\n## OSX\n\nDev can be installed with Homebrew.\n\n```bash\nbrew tap wish/homebrew-wish\nbrew install wish-dev\n```\n\n# Building\n\nYou will need a current version of [golang](https://golang.org/dl/) that supports\nmodules to build this project.\n\n1. Clone this repository.\n1. If you clone into your $GOPATH, you will need to enable go modules via the\n[GO11MODULE](https://github.com/golang/go/wiki/Modules) environment variable.\n1. Run `make help` for a list of targets.\n\n\n# Configuration\n\nThe `dev` command will search the current directory and its parent directory\nuntil it locates a configuration file. If no configuration file is found in\nyour home directory it will look in the `$XDG_CONFIG_HOME/dev` directory for\none. Valid dev configuration file names will match the following regular\nexpression: `.?dev.ya?ml`.\n\nThe search for a configuration file can also be overridden by specifying a path\nvia the DEV_CONFIG environment variable. This is the same mechanism you must use\nif you would like to use more than one dev configuration file. To use more\nthan one configuration file, separate the .dev.yaml paths with a colon, i.e.:\n\n```\nexport DEV_CONFIG=$HOME/Projects/app_one:$HOME/Projects/shared_app_config\n```\n\n### .dev.yaml\n\nThere are many ways to structure you project with the `dev` tool.\n\nTypically you will have one .dev.yaml file for each project. Each .dev.yaml\ncan manage multiple projects if you happen to have multiple projects in\nthe same repository.\n\nIf you require more than one docker-compose.yml for your project you can\nspecify these in the .dev.yaml file. For example, for the my-app project which\nhas a layout like this:\n\n```\n  $HOME/Projects/my-app:\n    .dev.yaml\n    docker-compose.yml\n\n  $HOME/Projects/my-app/docker\n    docker-compose.shared.yml\n```\n\nThe $HOME/Projects/my-app/dev.yml might contain something like this:\n\n ```yaml\nprojects:\n  my-app:\n    docker_compose_files:\n      - \"docker/docker-compose.shared.yml\"\n      - \"docker-compose.yml\"\n    depends_on: [\"my-registry\", \"my-external-network\"]\n\nnetworks:\n  my-external-network:\n    driver: bridge\n    ipam:\n      driver: default\n      config:\n        - subnet: 173.16.242.0/16\n\nregistries:\n  my-registry:\n      url: \"https://my-registry.personal.com\"\n      username: \"name\"\n      password: \"pa$$word\"\n      continue_on_failure: True\n ```\n\nRunning 'dev my-app build' will attempt to login to `my-registry` before\nrunning docker-compose build.\n\nWhen `dev my-app up` is run `dev` will first create `my-external-network` if it\ndoes not exist already, taking care to remove any existing containers listed in\nthe `docker_compose_files` that are connected to a network of the same name but\na different network id.\n\n'dev my-app sh' will shell into the project container or run any commands specified on\ncontainer. 'dev my-app sh ls -al' will list all of the files in the project container.\nThe \"project\" container is the container in the docker-compose.yml with the\nsame name as the project in the .dev.yaml file.\n\n\n# Project Commands\n\nThe following commands are added as sub-commands for each project defined in your\n.dev.yaml file/s.\n\n## build\n\nRun docker-compose build for the specified project. The build will specify\nall the docker-compose files in the project's `docker_compose_files` array\nto the `docker-compose` command with the -f flag.\n\n## ps\n\nView details about the services running for the specified project. This is the\noutput of docker-compose ps for your project.\n\n## up\n\nStart the containers for the specified project. This will build or fetch the\nimages as required.\n\n## down\n\nStop and remove the containers for the specified project. This will _not_ stop any shared services and networks.\n\n## sh\n\nRun without arguments this command runs an interactive shell on the project\ncontainer. If run with arguments, the arguments are passed to the container shell\nwith the -c flag.\n\nIf this command is run from a subdirectory of the project directory this\ncommand will first change directories such that relative commands from your\ndirectory on the host can be run. If run from outside of your project\ndirectory the starting directory defaults to the WORKDIR specified in the\nproject's Dockerfile. This functionality currently assumes that mapped the\nproject directory (the one where the .dev.yaml file resides) into the\nproject container.\n\n\n# Contributing\n\n1. Fork it\n1. Download your fork to your PC (`git clone https://github.com/your_username/dev \u0026\u0026 cd dev`)\n1. Create your feature branch (`git checkout -b my-new-feature`)\n1. Make changes and add them (`git add .`)\n1. Commit your changes (`git commit -m 'Add some feature'`)\n1. Push to the branch (`git push origin my-new-feature`)\n1. Create new pull request\n\n# License\n\nDev is released under the MIT license. See [LICENSE](https://github.com/wish/dev/blob/master/LICENSE)\n\n\n\n[1]: https://codecov.io/gh/wish/dev/branch/master/graph/badge.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwish%2Fdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwish%2Fdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwish%2Fdev/lists"}