{"id":26804804,"url":"https://github.com/throughnothing/vagrant-docker-starter","last_synced_at":"2025-03-29T22:27:13.961Z","repository":{"id":66719063,"uuid":"46814101","full_name":"throughnothing/vagrant-docker-starter","owner":"throughnothing","description":"Skeleton repo for starting a project with vagrant-docker","archived":false,"fork":false,"pushed_at":"2015-11-25T01:44:03.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-14T01:26:40.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/throughnothing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-24T19:37:33.000Z","updated_at":"2015-11-25T01:27:14.000Z","dependencies_parsed_at":"2023-03-11T00:16:24.743Z","dependency_job_id":null,"html_url":"https://github.com/throughnothing/vagrant-docker-starter","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2Fvagrant-docker-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2Fvagrant-docker-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2Fvagrant-docker-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2Fvagrant-docker-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/throughnothing","download_url":"https://codeload.github.com/throughnothing/vagrant-docker-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246252548,"owners_count":20747766,"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":[],"created_at":"2025-03-29T22:27:13.427Z","updated_at":"2025-03-29T22:27:13.941Z","avatar_url":"https://github.com/throughnothing.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vagrant Docker Starter\n\nThis project is intended to serve as a template for your projects\nwhere you want to use [Vagrant](http://vagrantup.com) and\n[Docker](http://docker.com) to ensure consistency\nin your deployments, as well as your development environment.\n\nThe templates within provide a standard (but opinionated) way to have a\n`docker-host` Vagrant machine which can run, orchestrate, and link\nvarious Docker containers, including your app, and any other services\n(PostgreSQL, Redis, etc.) it may depend on. A `docker-host` machine is used\nto guarantee consistency (often certain things will need to be provisioned on\nthe host, and it's best to keep this isolated and off your local OS), and also\nto ensure that it works across platforms (notably OSX) that may not support\ndocker natively.\n\n# Quick Start\n\nThe following examples help you see how `vagrant-docker-starter` \"works\":\n\n```bash\n# Run these from this project root\n\n# See the docker-host + all configured containers\nvagrant status\n\n# Boot the docker-host VM\nvagrant up docker-host\n\n# Start the postgres container\nvagrant up postgres\n\n# Start the redis container\nvagrant up redis\n\n# Reload the redis container\nvagrant reload redis\n\n# Stop the redis + postgres containers\nvagrant halt redis postgres\n\n# Shut down the docker-host VM\nvagrant halt docker-host\n\n# Start all containers (in order)\n# If your containers use links, you'll need to use --no-parallel\n# To ensure they are started sequentially\nvagrant up --no-parallel\n```\n\n# Structure\n\nBy default, the `Vagrantfile` and it's config `YAML` file are placed in the\n`ops/` directory, to keep the root uncluttered.  These files can be moved\nanywhere, but if you move the `Vagrantfile`, you may have to update the path\nto the `vagrant-config.yml`.  Additionally, moving where the `Vagrantfile` is\nwill change what directory you have to run your `vagrant` commands from.\n\nThe `ops/` directory is also the place where you can add directories and files\nneeded to provision your `docker-host`, and for docker config files or scripts\nneeded to build images for your particular project.  We find it's best to\nkeep these out of your project root, and the `ops/` directory seems suited\nfor this.\n\nYou should ideally not have to modify the `Vagrantfile`, as most of the\nconfiguration for both the `docker-host` and all of your containers can be\nkept in the `vagrant-config.yml` file, which, by default, resides in the\n`ops/` directory.\n\n## vagrant-config.yml\n\nThe `vagrant-config.yml` contains 2 main sections:\n[Docker_host](#docker_host) and [Containers](#containers).\n\n### docker\\_host\n\nThe `docker\\_host` section allows you to customize the memory, cpus, and \nports forwarded to the host machine.\n\n### containers\n\nYou specify your docker containers the `vagrant-config.yml` file under the\n`containers` section.  The general format inside the `containers` section\nmatches the [docker-compose](https://docs.docker.com/compose/compose-file/)\nfile format as closely as possible.\n\n# Using Vagrant Docker Starter in your project\n\nYou can create a new project directory from the templates here pretty easily\nwith `git-archive` using the following:\n\n```bash\ngit archive master | tar -x -C /new/project/\n```\n\n# How is this different from vagrant-docker-compose\n\n[Vagrant-docker-compose](https://github.com/leighmcculloch/vagrant-docker-compose)\nis a great little Vagrant plugin, but it does not show you all of your\ncontainers when running `vagrant status`.  It will only show the docker host.\nThis makes it more cumbersom to see which containers your project contains,\nwhich containers are running, and to start/stop/reload specifc containers at\nwill.\n\nWith `vagrant-docker-compose` I find that it is not easy to use the\n`vagrant docker-run` command, which can come in handy for running one-off\ncommands from within a container, for testing, debugging, or similar.\n\nAdditionally, `vagrant-docker-compose` does not make it easy to have special\ncontainers for tasks such as building `golang` projects, or other one-off\npre-process tasks.\n\n## docker-compose.yml compatible\n\nThe good news is that I have structured the `vagrant-config.yml` file\nto be mostly `docker-compose` compatible.  This means that the `containers`\nsection of the `vagrant-config.yml` file used by this project, will also\nwork with `docker-compose` if broken out into it's own file.  And, thus,\nthis section will also work with `vagrant-docker-compose`.\n\nIf you give these templates a try, and they're not for you, it's easy to\nswitch your work over!\n\n# TODO\n\n* Ordering of how containers come up would be nice\n* Make it easy to provision the `docker-host` with `:shell`, `:chef\\_solo`,\n  `:ansible`, etc.\n\n# LICENSE\n\nPublic Domain, of course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthroughnothing%2Fvagrant-docker-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthroughnothing%2Fvagrant-docker-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthroughnothing%2Fvagrant-docker-starter/lists"}