{"id":15663136,"url":"https://github.com/scrogson/devbox","last_synced_at":"2025-06-22T05:33:06.233Z","repository":{"id":142411873,"uuid":"127318803","full_name":"scrogson/devbox","owner":"scrogson","description":"Devbox is responsible for bootstrapping your multi-container development environment","archived":false,"fork":false,"pushed_at":"2020-02-08T00:08:14.000Z","size":55,"stargazers_count":18,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T23:55:35.554Z","etag":null,"topics":["cli","development-environment","docker"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scrogson.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":"2018-03-29T16:33:22.000Z","updated_at":"2024-05-03T12:54:04.000Z","dependencies_parsed_at":"2023-07-24T02:57:59.486Z","dependency_job_id":null,"html_url":"https://github.com/scrogson/devbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scrogson/devbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrogson%2Fdevbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrogson%2Fdevbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrogson%2Fdevbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrogson%2Fdevbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrogson","download_url":"https://codeload.github.com/scrogson/devbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrogson%2Fdevbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261243140,"owners_count":23129585,"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":["cli","development-environment","docker"],"created_at":"2024-10-03T13:35:36.071Z","updated_at":"2025-06-22T05:33:01.221Z","avatar_url":"https://github.com/scrogson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devbox\n\n\u003e devbox is responsible for bootstrapping your development environment.\n\n## About devbox\n\n`devbox` is a work in progress. It is an opinionated wrapper around `docker` and\n`docker-compose`.\n\n`devbox` provides a way to get all of your services for local application\ndevelopment up and running quickly. Simply create a project and tell `devbox`\nwhat services are included, it will handle the rest.\n\n## Installation\n\nIn order to build this package you'll need a few dependencies install:\n\n* Rust\n* Docker\n\n### Installing Rust\n\nThe de-facto way to install [Rust](https://www.rust-lang.org/en-US/) is via [rustup](https://rustup.rs/).\n\nRun the following in your terminal, then follow the onscreen instructions.\n\n```shell\n$ curl https://sh.rustup.rs -sSf | sh\n```\n\n### Installing Docker\n\nIf you're running macOS you'll want visit the [Docker for Mac website](https://store.docker.com/editions/community/docker-ce-desktop-mac) for\ninstallation instructions.\n\n### Installing devbox\n\nTo get `devbox` installed, simply run the following:\n\n```shell\n$ cargo install --git https://github.com/scrogson/devbox --bin devbox\n```\n\nThis will compile `devbox` and move the resulting executable into `~/.cargo/bin`\nwhich you should have been instructed to put in your `$PATH` when installing\nRust.\n\n### Generating a Project\n\n`devbox` works with projects. A project is a namespace to provide isolation\nbetween containers in other projects one might have.\n\nTo generate a project, use the `new` subcommand with the name of our project like so:\n\n```shell\n$ devbox new example\n```\n\nThis will generate a couple of files in your home directory:\n\n```shell\n$ tree ~/.config/devbox/ -L 2\n~/.config/devbox/\n└── example\n    ├── config.toml\n    └── docker-compose.yml\n\n1 directory, 2 files\n```\n\nThe `config.toml` file is the `devbox` configuration for your project. In it\ncontains configuration for all of the services in your project. It looks like\nthis:\n\n```toml\nvolumes = [\n  \"mysql\",\n  \"postgres\"\n]\n\n[services]\nexample = { git = \"git@github.com:user/example\" }\n```\n\n#### Volumes\n\nVolumes is an array of `docker` volume names used in your project. These volumes\nwill be created by `devbox build`.\n\n#### Services\n\nServices are declared by specifying the name of the service and configuring\na `git` repository URL where the service can be cloned from. When working with\na local service on disk, specify the `path` option along with the absolute path\nto the service on disk.\n\n### Build the Docker Containers\n\nSet up the networking, pull down the latest docker images, and build the docker\ncontainers:\n\n```shell\n$ devbox build -p example\n```\n\n## Running devbox\n\nFrom the root of the repository:\n\n```shell\n$ devbox start -p example\n```\n\nThis will run the support services.\n\nThe `ps` command can be used to list the running containers and confirm they have started correctly:\n\n```shell\nλ devbox ps\nCONTAINER ID        NAMES                    STATUS              PORTS\n8fd9e21e74dc        example_kafka_1          Up 6 minutes        127.0.0.1:9092-\u003e9092/tcp\n66520b2ba9cc        example_zookeeper_1      Up 6 minutes        2888/tcp, 127.0.0.1:2181-\u003e2181/tcp, 3888/tcp\nf8f37e7baa69        example_mysql_1          Up 6 minutes        127.0.0.1:3306-\u003e3306/tcp\nec04a7699e15        example_postgres_1       Up 6 minutes        127.0.0.1:5432-\u003e5432/tcp\n45abb5cdd9ad        example_elasticsearch_1  Up 6 minutes        127.0.0.1:9200-\u003e9200/tcp, 9300/tcp\nfe8b9d71bf70        example_redis_1          Up 6 minutes        127.0.0.1:6379-\u003e6379/tcp\n```\n\n### Reading Logs\n\nEach service runs in its own docker container and writes its logs to standard\noutput. In order to view the latest log output:\n\n```shell\n$ devbox logs -p example mysql\n```\n\nTo stream the logs in real time use the `--follow` flag:\n\n```shell\n$ devbox logs -p example -f postgres\n```\n\n**Note:** use `devbox ps` to see a list of docker container names.\n\n### Stopping devbox\n\nFrom the root of the repository:\n\n```shell\n$ devbox stop -p example\n```\n\nThis will stop the docker containers in the `example` project.\n\n### DEVBOX_PROJECT\n\nMost of the time, you'll be using only a single devbox project at a time.\nInstead of explicitly passing `-p \u003cproject\u003e` for each command, `devbox` can\nread your project name from the `DEVBOX_PROJECT` environment variable.\n\n## Troubleshooting\n\n### Failure Starting\n\nEnsure the Docker for Mac application is running.\n\nTo always start on boot OS X users can go to `System Preferences \u003e Users\n\u0026 Groups` and add the Docker application to the Login Items list.\n\n### Services in Status Restarting (137)\n\nThis is likely caused by Docker not having access to enough memory. You can\nchange this in Docker preferences in the `Advanced` tab. By default Docker is\nset to request 2GB of memory. You may need to bump this to at least 4GB in order\nto run all services provided by `devbox`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrogson%2Fdevbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrogson%2Fdevbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrogson%2Fdevbox/lists"}