aboutsummaryrefslogtreecommitdiff
path: root/app/nextcloud/integration
diff options
context:
space:
mode:
authorQuentin <quentin@dufour.io>2021-01-18 08:18:21 +0100
committerQuentin <quentin@dufour.io>2021-01-18 08:18:21 +0100
commitad6017eea058f7cb6fdf078783f992a4f45a3e15 (patch)
tree6620bcc9e1ea61a5689b763b9ad8280275e35e76 /app/nextcloud/integration
parent79b7273ff2a487d6721d393682c8ad3927467a75 (diff)
parentc642370def01f09d966b3b9c643cfe416ea115cf (diff)
downloadinfrastructure-ad6017eea058f7cb6fdf078783f992a4f45a3e15.tar.gz
infrastructure-ad6017eea058f7cb6fdf078783f992a4f45a3e15.zip
Merge pull request 'Reorganize app/ and add script for secret management' (#29) from test_reorganize into master
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/pulls/29
Diffstat (limited to 'app/nextcloud/integration')
-rw-r--r--app/nextcloud/integration/README.md20
-rw-r--r--app/nextcloud/integration/bottin.json31
-rw-r--r--app/nextcloud/integration/docker-compose.yml27
3 files changed, 78 insertions, 0 deletions
diff --git a/app/nextcloud/integration/README.md b/app/nextcloud/integration/README.md
new file mode 100644
index 0000000..3d49768
--- /dev/null
+++ b/app/nextcloud/integration/README.md
@@ -0,0 +1,20 @@
+Install Owncloud CLI:
+
+php ./occ \
+ --no-interaction \
+ --verbose \
+ maintenance:install \
+ --database pgsql \
+ --database-name nextcloud \
+ --database-host postgres \
+ --database-user nextcloud \
+ --database-pass nextcloud \
+ --admin-user nextcloud \
+ --admin-pass nextcloud \
+ --admin-email coucou@deuxfleurs.fr
+
+Official image entrypoint:
+
+https://github.com/nextcloud/docker/blob/master/20.0/fpm/entrypoint.sh
+
+
diff --git a/app/nextcloud/integration/bottin.json b/app/nextcloud/integration/bottin.json
new file mode 100644
index 0000000..a970762
--- /dev/null
+++ b/app/nextcloud/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/app/nextcloud/integration/docker-compose.yml b/app/nextcloud/integration/docker-compose.yml
new file mode 100644
index 0000000..7ba090b
--- /dev/null
+++ b/app/nextcloud/integration/docker-compose.yml
@@ -0,0 +1,27 @@
+version: '3.4'
+services:
+ php:
+ image: lxpz/deuxfleurs_nextcloud_amd64:8
+ depends_on:
+ - bottin
+ - postgres
+ ports:
+ - "80:80"
+
+ postgres:
+ image: postgres:9.6.19
+ environment:
+ - POSTGRES_DB=nextcloud
+ - POSTGRES_USER=nextcloud
+ - POSTGRES_PASSWORD=nextcloud
+
+ bottin:
+ image: lxpz/bottin_amd64:14
+ depends_on:
+ - consul
+ volumes:
+ - ./bottin.json:/config.json
+
+ consul:
+ image: consul:1.8.4
+