aboutsummaryrefslogtreecommitdiff
path: root/consul/configuration
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-07-05 22:54:47 +0200
committerAlex Auvolat <alex@adnab.me>2020-07-05 22:55:00 +0200
commitc344dacb65e967bef7a06e34adb02494d98cde77 (patch)
tree6da8818681683ceaaa6271f4023c2371e87a4b3f /consul/configuration
parent5e83c8e5fe8f5b9566673e96c6d963bc8d0129d6 (diff)
downloadinfrastructure-c344dacb65e967bef7a06e34adb02494d98cde77.tar.gz
infrastructure-c344dacb65e967bef7a06e34adb02494d98cde77.zip
Add garage and nextcloud configuration
Diffstat (limited to 'consul/configuration')
-rw-r--r--consul/configuration/.gitignore2
-rw-r--r--consul/configuration/directory/bottin/config.json2
-rw-r--r--consul/configuration/directory/guichet/config.json.tpl3
-rw-r--r--consul/configuration/nextcloud/config.php.tpl49
4 files changed, 55 insertions, 1 deletions
diff --git a/consul/configuration/.gitignore b/consul/configuration/.gitignore
index dabb84d..056b4d2 100644
--- a/consul/configuration/.gitignore
+++ b/consul/configuration/.gitignore
@@ -29,3 +29,5 @@
!directory/*/*
!traefik/traefik.toml
+
+!garage/config.toml
diff --git a/consul/configuration/directory/bottin/config.json b/consul/configuration/directory/bottin/config.json
index 27351f4..c30a4d5 100644
--- a/consul/configuration/directory/bottin/config.json
+++ b/consul/configuration/directory/bottin/config.json
@@ -22,6 +22,8 @@
"*,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/consul/configuration/directory/guichet/config.json.tpl b/consul/configuration/directory/guichet/config.json.tpl
index ce34f98..98e2297 100644
--- a/consul/configuration/directory/guichet/config.json.tpl
+++ b/consul/configuration/directory/guichet/config.json.tpl
@@ -13,7 +13,8 @@
"invited_mail_format": "{}@deuxfleurs.fr",
"invited_auto_groups": [
"cn=email,ou=groups,dc=deuxfleurs,dc=fr",
- "cn=seafile,ou=groups,dc=deuxfleurs,dc=fr"
+ "cn=seafile,ou=groups,dc=deuxfleurs,dc=fr",
+ "cn=nextcloud,ou=groups,dc=deuxfleurs,dc=fr"
],
"web_address": "https://guichet.deuxfleurs.fr",
diff --git a/consul/configuration/nextcloud/config.php.tpl b/consul/configuration/nextcloud/config.php.tpl
new file mode 100644
index 0000000..7dcfc6e
--- /dev/null
+++ b/consul/configuration/nextcloud/config.php.tpl
@@ -0,0 +1,49 @@
+<?php
+$CONFIG = array (
+ 'appstoreenabled' => false,
+ 'instanceid' => '{{ key "secrets/nextcloud/instance_id" | trimSpace }}',
+ 'passwordsalt' => '{{ key "secrets/nextcloud/password_salt" | trimSpace }}',
+ 'secret' => '{{ key "secrets/nextcloud/secret" | trimSpace }}',
+ 'trusted_domains' => array (
+ 0 => 'nextcloud.deuxfleurs.fr',
+ ),
+ 'memcache.local' => '\\OC\\Memcache\\APCu',
+
+ 'objectstore' => array(
+ 'class' => '\\OC\\Files\\ObjectStore\\S3',
+ 'arguments' => array(
+ 'bucket' => 'nextcloud',
+ 'autocreate' => false,
+ 'key' => '{{ key "secrets/nextcloud/garage_access_key" | trimSpace }}',
+ 'secret' => '{{ key "secrets/nextcloud/garage_secret_key" | trimSpace }}',
+ 'hostname' => 'garage.deuxfleurs.fr',
+ 'port' => 443,
+ 'use_ssl' => true,
+ 'region' => 'garage',
+ // required for some non Amazon S3 implementations
+ 'use_path_style' => true
+ ),
+ ),
+
+ 'dbtype' => 'pgsql',
+ 'dbhost' => 'psql-proxy.service.2.cluster.deuxfleurs.fr',
+ 'dbname' => 'nextcloud',
+ 'dbtableprefix' => 'nc_',
+ 'dbuser' => '{{ key "secrets/nextcloud/db_user" | trimSpace }}',
+ 'dbpassword' => '{{ key "secrets/nextcloud/db_pass" | trimSpace }}',
+
+ 'default_language' => 'fr',
+ 'default_locale' => 'fr_FR',
+
+ 'mail_domain' => 'deuxfleurs.fr',
+ 'mail_from_address' => 'nextcloud@deuxfleurs.fr',
+ // TODO SMTP CONFIG
+
+ // TODO REDIS CACHE
+
+ 'version' => '19.0.0.12',
+ 'overwrite.cli.url' => 'https://nextcloud.deuxfleurs.fr',
+
+ 'installed' => true,
+);
+