Skip to content

Instantly share code, notes, and snippets.

@mcharytoniuk
Last active April 30, 2021 05:00
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mcharytoniuk/0388cbc5d2e0afacd1e4 to your computer and use it in GitHub Desktop.
Save mcharytoniuk/0388cbc5d2e0afacd1e4 to your computer and use it in GitHub Desktop.
Vagrant + docker-compose
mongo:
image: mongo
ports:
- "27017:27017"
restart: always
redis:
image: redis
ports:
- "6379:6379"
restart: always
Vagrant.configure(2) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.network "forwarded_port", guest: 3306, host: 3306
# If errors occur, try running "vagrant provision" manually
# after "vagrant up"
config.vm.provision :docker
# To use docker_compose as a provisioning tool, install
# vagrant-docker-compose plugin first. It should also solve the
# "The '' provisioner could not be found." error:
# $ vagrant plugin install vagrant-docker-compose
config.vm.provision :docker_compose, rebuild: true, run: "always", yml: "/vagrant/docker-compose.yml"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment