From f056e6940c7aeabf77189bcb6216ca6fb3ec2a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Wed, 17 May 2017 02:07:06 +0100 Subject: [PATCH] Some docs about the dev environment in README.md --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index e69de29..92c7cb2 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,41 @@ +# Gestion Événementiel + +## Vagrant + +### Production-like environment + +Our Vagrant setup provides two ways of running GestionEvenementiel: + +1. You can run the usual development server with: + + python manage.py runserver 0.0.0.0:8000 + + Please note that we specify the interface `0.0.0.0` to make the server + reachable outside the VM at address `localhost:8000` + +2. A second instance, more similar to the production environment, runs with + Daphne and nginx in the VM. It runs permanently by default but is not + reloaded when you update the code. To restart this server, type: + + python manage.py collectstatic --noinput + sudo systemctl restart daphne.service worker.service + + To query this instance from the host, you have to use the address + `localhost:8080`. It is a good practice to ensure that this instance works + before submitting a merge request (although it might break sometimes). + + +### About synced folders + +Due to a limitation related to the Debian boxes, VirtualBox synced folders +cannot be enabled. Vagrant uses `rsync` instead to upload the current folder +into the VM at `/vagrant`. But this only occurs once each time you run +`vagrant up` or `vagrant reload`. However you can ask Vagrant to automatically +resync when changes occur in the host with the `vagrant rsync-auto` command. +Please note that this is a **one-way** synchronization. + +For more information: + +- https://wiki.debian.org/Teams/Cloud/VagrantBaseBoxes#Shared_folders +- https://www.vagrantup.com/docs/synced-folders/rsync.html +