diff --git a/integration/README.md b/integration/README.md new file mode 100644 index 0000000..e8cc112 --- /dev/null +++ b/integration/README.md @@ -0,0 +1,11 @@ +# Intégration de Guichet dans un environnement de dev/test + +## Dev process + +On utilise `docker compose` pour mettre en place l'infrastructure dont dépend Guichet, que l'on développe. (On rajoutera Garage dedans plus tard.) + +On ne met pas Guichet dans le `compose` pour pouvoir itérer plus rapidement : un `go build` et on a la nouvelle version, sans avoir restart les dépendances (Bottin, Consul...). + +## Notes + +* Bien récupérer le password `admin` dans les logs de 1er lancement de Bottin : il ne sera pas réaffiché. \ No newline at end of file diff --git a/integration/config/bottin.json b/integration/config/bottin.json new file mode 100644 index 0000000..0b54e22 --- /dev/null +++ b/integration/config/bottin.json @@ -0,0 +1,13 @@ +{ + "suffix": "dc=bottin,dc=eu", + "bind": "bottin:389", + "consul_host": "consul:8500", + "acl": [ + "ANONYMOUS::bind:*,ou=users,dc=bottin,dc=eu:", + "ANONYMOUS::bind:cn=admin,dc=bottin,dc=eu:", + "*,dc=bottin,dc=eu::read:*:* !userpassword", + "*::read modify:SELF:*", + "cn=admin,dc=bottin,dc=eu::read add modify delete:*:*", + "*:cn=admin,ou=groups,dc=bottin,dc=eu:read add modify delete:*:*" + ] +} diff --git a/integration/docker-compose.yml b/integration/docker-compose.yml new file mode 100644 index 0000000..5ed0650 --- /dev/null +++ b/integration/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + consul: + image: consul + restart: "always" + expose: + - "8500" + bottin: + image: dxflrs/bottin:dnp41vp8w24h4mbh0xg1mybzr1f46k41 + command: "-config /etc/bottin.json" + restart: "always" + depends_on: ["consul"] + expose: + - 389 + volumes: + - "./config/bottin.json:/etc/bottin.json"