Skip to content
Extraits de code Groupes Projets

Resolve "Configurer le fichier Vagrant pour les test en local"

Fusionnées nono requested to merge 124-configurer-le-fichier-vagrant-pour-les-test-en-local into preprod
1 fichier
+ 11
2
Comparer les modifications
  • Côte à côte
  • En ligne
+ 15
25
@@ -14,6 +14,8 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bullseye64"
config.vm.define "don-debian64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
@@ -23,16 +25,17 @@ Vagrant.configure("2") do |config|
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 8000, host: 8383
# config.vm.network "forwarded_port", guest: 80, host: 3141
# config.vm.network "forwarded_port", guest: 8000, host: 3141
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "forwarded_port", guest: 8000, host: 8282, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.56.1"
config.vm.network "private_network", ip: "192.168.56.42"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
@@ -43,28 +46,15 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Si vous voulez avoir la possibilité de faire des modifications directement
# dans le dossier local, et voir les modifications sans avoir besoin de faire
# `vagrant provision`, vous pouvez décommenter la ligne ci-dessous avant de
# faire `vagrant up && vagrant provision`.
# config.vm.synced_folder "./", "/home/don/don"
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/playbook.yml"
end
end
Chargement en cours