diff options
author | Alex <alex@adnab.me> | 2023-03-31 14:18:49 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-03-31 14:18:49 +0000 |
commit | 02670ba6a60af8db1818d6d3adaafc7810d14689 (patch) | |
tree | b04c8bcae650c91196beb90a92aa18566b2364b9 | |
parent | f77697f50147f34aad34fd13aab85f335f6a9746 (diff) | |
parent | 5fb0139a3fccde294ab35659ef839618400dcca2 (diff) | |
download | guichet-02670ba6a60af8db1818d6d3adaafc7810d14689.tar.gz guichet-02670ba6a60af8db1818d6d3adaafc7810d14689.zip |
Merge pull request 'added integration folder with a docker compose file and some explanation' (#18) from integration into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/guichet/pulls/18
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | integration/README.md | 16 | ||||
-rw-r--r-- | integration/config/bottin.json | 13 | ||||
-rw-r--r-- | integration/config/guichet.json | 34 | ||||
-rw-r--r-- | integration/docker-compose.yml | 16 |
5 files changed, 80 insertions, 0 deletions
@@ -3,3 +3,4 @@ guichet.static config.json result .direnv/ +password diff --git a/integration/README.md b/integration/README.md new file mode 100644 index 0000000..01cde3f --- /dev/null +++ b/integration/README.md @@ -0,0 +1,16 @@ +# 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é. +* Identifiant de l'admin sur Guichet : `cn=admin,dc=bottin,dc=eu` because il n'est pas dans `ou=users,dc=bottin,dc=eu` qui est l'organisation par défaut dans laquelle on va chercher les utilisateurs. + +## TODO + +* Bridger Garage/S3 (pour le moment ne sert que pour les avatars dans l'annuaire)
\ 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/config/guichet.json b/integration/config/guichet.json new file mode 100644 index 0000000..8f6c20b --- /dev/null +++ b/integration/config/guichet.json @@ -0,0 +1,34 @@ +{ + "http_bind_addr": ":9991", + "ldap_server_addr": "ldap://127.0.0.1:389", + + "base_dn": "dc=bottin,dc=eu", + "user_base_dn": "ou=users,dc=bottin,dc=eu", + "user_name_attr": "cn", + "group_base_dn": "ou=groups,dc=bottin,dc=eu", + "group_name_attr": "cn", + + "invitation_base_dn": "ou=invitations,dc=bottin,dc=eu", + "invitation_name_attr": "cn", + "invited_mail_format": "{}@bottin.eu", + "invited_auto_groups": [ + "cn=email,ou=groups,dc=bottin,dc=eu" + ], + + "web_address": "https://guichet.bottin.eu", + "mail_from": "welcome@bottin.eu", + "smtp_server": "smtp.bottin.eu", + "smtp_username": "guichet", + "smtp_password": "", + + "admin_account": "cn=admin,dc=bottin,dc=eu", + "group_can_admin": "gid=admin,ou=groups,dc=bottin,dc=eu", + "group_can_invite": "", + + "s3_endpoint": "garage.bottin.eu", + "s3_access_key": "", + "s3_secret_key": "", + "s3_region": "garage", + "s3_bucket": "bottin-pictures" +} + diff --git a/integration/docker-compose.yml b/integration/docker-compose.yml new file mode 100644 index 0000000..6331737 --- /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"] + ports: + - "389:389" + volumes: + - "./config/bottin.json:/etc/bottin.json" |