aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/plume/integration
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-08-24 19:54:15 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-08-24 19:54:15 +0200
commit00b754727d9b16b13de7591b07d5bf0635029c4b (patch)
treef0e68c18b2578e6c20c66cbe736a5cafe2037423 /cluster/prod/app/plume/integration
parent1172e8e511c26e43bb23bcc265465b7284485e17 (diff)
downloadnixcfg-00b754727d9b16b13de7591b07d5bf0635029c4b.tar.gz
nixcfg-00b754727d9b16b13de7591b07d5bf0635029c4b.zip
Add postgres + WIP plume + fix diplonat
Diffstat (limited to 'cluster/prod/app/plume/integration')
-rw-r--r--cluster/prod/app/plume/integration/bottin.json31
-rw-r--r--cluster/prod/app/plume/integration/docker-compose.yml28
-rw-r--r--cluster/prod/app/plume/integration/plume.env31
3 files changed, 90 insertions, 0 deletions
diff --git a/cluster/prod/app/plume/integration/bottin.json b/cluster/prod/app/plume/integration/bottin.json
new file mode 100644
index 0000000..a970762
--- /dev/null
+++ b/cluster/prod/app/plume/integration/bottin.json
@@ -0,0 +1,31 @@
+{
+ "suffix": "dc=deuxfleurs,dc=fr",
+ "bind": "0.0.0.0:389",
+ "consul_host": "http://consul:8500",
+ "log_level": "debug",
+ "acl": [
+ "*,dc=deuxfleurs,dc=fr::read:*:* !userpassword",
+ "*::read modify:SELF:*",
+ "ANONYMOUS::bind:*,ou=users,dc=deuxfleurs,dc=fr:",
+ "ANONYMOUS::bind:cn=admin,dc=deuxfleurs,dc=fr:",
+ "*,ou=services,ou=users,dc=deuxfleurs,dc=fr::bind:*,ou=users,dc=deuxfleurs,dc=fr:*",
+ "*,ou=services,ou=users,dc=deuxfleurs,dc=fr::read:*:*",
+
+ "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:add:*,ou=invitations,dc=deuxfleurs,dc=fr:*",
+ "ANONYMOUS::bind:*,ou=invitations,dc=deuxfleurs,dc=fr:",
+ "*,ou=invitations,dc=deuxfleurs,dc=fr::delete:SELF:*",
+
+ "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:add:*,ou=users,dc=deuxfleurs,dc=fr:*",
+ "*,ou=invitations,dc=deuxfleurs,dc=fr::add:*,ou=users,dc=deuxfleurs,dc=fr:*",
+
+ "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=email,ou=groups,dc=deuxfleurs,dc=fr:*",
+ "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=email,ou=groups,dc=deuxfleurs,dc=fr:*",
+ "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=seafile,ou=groups,dc=deuxfleurs,dc=fr:*",
+ "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=seafile,ou=groups,dc=deuxfleurs,dc=fr:*",
+ "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=nextcloud,ou=groups,dc=deuxfleurs,dc=fr:*",
+ "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=seafile,ou=nextcloud,dc=deuxfleurs,dc=fr:*",
+
+ "cn=admin,dc=deuxfleurs,dc=fr::read add modify delete:*:*",
+ "*:cn=admin,ou=groups,dc=deuxfleurs,dc=fr:read add modify delete:*:*"
+ ]
+}
diff --git a/cluster/prod/app/plume/integration/docker-compose.yml b/cluster/prod/app/plume/integration/docker-compose.yml
new file mode 100644
index 0000000..b88de8a
--- /dev/null
+++ b/cluster/prod/app/plume/integration/docker-compose.yml
@@ -0,0 +1,28 @@
+version: '3.4'
+services:
+ plume:
+ image: superboum/plume:v1
+ env_file:
+ - plume.env
+ depends_on:
+ - consul
+ - postgres
+ ports:
+ - "7878:7878"
+
+ postgres:
+ image: postgres:9.6.19
+ environment:
+ - POSTGRES_DB=plume
+ - POSTGRES_USER=plume
+ - POSTGRES_PASSWORD=plume
+
+ bottin:
+ image: lxpz/bottin_amd64:14
+ depends_on:
+ - consul
+ volumes:
+ - ./bottin.json:/config.json
+
+ consul:
+ image: consul:1.8.4
diff --git a/cluster/prod/app/plume/integration/plume.env b/cluster/prod/app/plume/integration/plume.env
new file mode 100644
index 0000000..88c62dc
--- /dev/null
+++ b/cluster/prod/app/plume/integration/plume.env
@@ -0,0 +1,31 @@
+BASE_URL=integration.env
+# generate one with openssl rand -base64 32
+ROCKET_SECRET_KEY=cXZbKoxWIBo0wdaD8tbA1B3BlH2LBSUmgzdyZZr8QxI=
+
+# Mail settings
+#MAIL_SERVER=smtp.example.org
+#MAIL_USER=example
+#MAIL_PASSWORD=123456
+#MAIL_HELO_NAME=example.org
+
+# DATABASE SETUP
+POSTGRES_PASSWORD=plume
+POSTGRES_USER=plume
+POSTGRES_DB=plume
+DATABASE_URL=postgres://plume:plume@postgres:5432/plume
+MIGRATION_DIRECTORY=migrations/postgres
+
+USE_HTTPS=0
+ROCKET_ADDRESS=0.0.0.0
+ROCKET_PORT=7878
+
+MEDIA_UPLOAD_DIRECTORY=/app/static/media
+SEARCH_INDEX=/app/search_index
+DOMAIN_NAME="integration.env"
+INSTANCE_NAME="Integration Instance"
+
+LDAP_ADDR=ldap://bottin:389
+LDAP_BASE_DN=ou=users,dc=deuxfleurs,dc=fr
+LDAP_USER_NAME_ATTR=cn
+LDAP_USER_MAIL_ATTR=mail
+LDAP_TLS=false