Skip to content
Extraits de code Groupes Projets
Valider 502a66ed rédigé par nono's avatar nono
Parcourir les fichiers

Merge branch 'preprod' into 123-mise-a-jour-du-readme

parents c3842df6 7f448098
Branches
Étiquettes
4 requêtes de fusion!163Update readme,!160Remove piplomes, update fix login, fix campaign presentation,!157Resolve "Mise à jour du README",!153Resolve "Mise à jour du README"
[submodule "www/static/pi-billion"]
path = www/static/pi-billion
url = https://git.laquadrature.net/lqdn-interne/pi-billion.git
[submodule "ansible/don-lqdn"]
path = ansible/don-lqdn
url = https://git.laquadrature.net/lqdn-interne/piops-roles/don-lqdn
branch = main
......@@ -67,12 +67,12 @@ coverage: ## Launch functional tests with coverage.
@./vendor/bin/codecept run functional --coverage-html
server-start: server-stop ## Launch a local server
@php -S 127.0.0.1:8000 -t ./www/ >> ./log/server.log &
@echo "\033[32mServer running. (http://127.0.0.1:8000)\033[0m"
@php -S 0.0.0.0:8000 -t ./www/ >> ./log/server.log &
@echo "\033[32mServer running. (http://0.0.0.0:8000)\033[0m"
server-stop: ## Stop local server if running
-@ps -aux | grep "[p]hp -S 127.0.0.1:8000" | grep -v grep | awk '{print $$2}' | xargs -r -n 1 kill
@echo "\033[32mServer stopped. (http://127.0.0.1:8000)\033[0m"
-@ps -aux | grep "[p]hp -S 0.0.0.0:8000" | grep -v grep | awk '{print $$2}' | xargs -r -n 1 kill
@echo "\033[32mServer stopped. (http://0.0.0.0:8000)\033[0m"
cs-fix: ## Fix CS
@vendor/bin/php-cs-fixer fix
......
......@@ -52,6 +52,22 @@ This is a php application based on Fat-Free-Framework and a MySQL database that
It's used as our primary donation platform, and uses our bank's payment system (cheaper) to get one-time or recurring payments recorded into the donation platform.
## Environnement de test
Afin de faciliter la réalisation de tests, vous pouvez utiliser Vagrant et Ansible à travers le rôle `don-lqdn`.
Pour la mise en place ;
- Mise en place de la machine virtuelle ; téléchargement d'une machine virtuelle Debian.
- `$ vagrant up`
- Installation du site de don ; Installation du rôle don-lqdn dans la machine virtuelle
- `$ vagrant provision`
- Vous pouvez maintenant voir le site de don sur `http://192.168.56.42:8000/`.
Les modifications faites dans ce dossier sont reportés directement dans la machine virtuelle, dans son dossier `/vagrant`.
Vous pouvez modifier ceci en éditant le fichier `Vagrantfile` et les fichiers dans le dossier `ansible/`.
## Installation (quick)
In order to install this project, run `make doctor` to check that everything is fine.
......
......@@ -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
# Fichier de configuration pour Ansible dans l'infrastructure de LQDN.
# Pour voir toutes les options, lancez `ansible-config list` ou la
# documentation: https://docs.ansible.com/ansible/latest/reference_appendices/config.html.
[defaults]
inventory = inventory.yml
log_path = ansible-run-lqdn.log
interpreter_python = auto_silent
roles_path = roles/
# Rajoute cette ligne aux fichiers de configuration géré par Ansible.
ansible_managed = "⚠ Ce fichier est géré par Ansible, ne pas modifier à la main ! - Responsables : Équipe Technique de La Quadrature Du Net"
# Configuration de l'affichage des playbooks
stdout_callback = yaml
# Ansible va nous prévenir si des commandes peuvent être remplacé
# par des modules ansible.
command_warnings = True
# Meuuuh 🐮
nocows = 0
[inventory]
# R.A.S
[privilege_escalation]
become = False
become_method = sudo
[colors]
highlight = white
verbose = blue
warn = bright purple
error = red
debug = dark gray
deprecate = purple
skip = cyan
unreachable = red
ok = green
changed = yellow
diff_add = green
diff_remove = red
diff_lines = cyan
[diff]
# Montre les différences, comme en utilisant -D/--diff
always = True
# Combien de lignes de contexte
context = 2
# Ce fichier contient les variables de configuration de l'environment de test
# du site de don.
# Si certaines variables ne sont pas mentionnées ici, c'est qu'elles ont
# été assignées leurs valeurs par défaut, présentes dans le rôle don-lqdn sous
# defaults/main.yml ou vars/main.yml
Subproject commit c046ebd9797833fb546af4462812ac3466f5439c
# Example de playbook permettant d'installer le site de don.
# Ce playbook peut à la fois être utilisé pour l'installation en production du
# site de don, mais aussi mettre en place le site de don dans un environment de
# test grâce à Vagrant.
- name: Installation du site de don dans l'environment de test
hosts: don-debian64
become: yes
# become_user: root
remote_user: root
vars_files:
- configuration.test.yml
roles:
- don-lqdn
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter