feat/nextcloud_compose #2

Open
ezwen wants to merge 19 commits from ezwen/services:feat/nextcloud_compose into main
First-time contributor
No description provided.
fix wrong compose file name
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
37dfd36287
Update README
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
3fc1128a4b
feat: add maintenance:repair to nextcloud setup
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
148be7e592
ezwen changed title from WIP: feat/nextcloud_compose to feat/nextcloud_compose 2025-03-01 18:56:53 +01:00
fix: migrate nextcloud mimetypes only on new install
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
439056f5c8
refact: remove nextcloud use of bbl_db_root_password
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
7fbf582f86
fix: add nextcloud depends_on links
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
4e185083ba
fix: remove cron from nextcloud depends_on
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
c023de397a
fix: set nextcloud redis owner/group
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
3a6d8f229a
fix: add missing args to nextcloud folder loop
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
863b3057cc
fix: add nextcloud systematic db configuration
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
f5a40c763e
@ -12,7 +12,7 @@
bbl_use_systemd: false
bbl_prevent_reboot: true
bbl_extra_packages:
- python-pexpect
Owner

Ah bah oui, mais ça casse la compatibilité avec arch, qui est l'image molecule sur ma collection ;)

Ah bah oui, mais ça casse la compatibilité avec arch, qui est l'image molecule sur ma collection ;)
Author
First-time contributor

Oui au final j'ai clairement volontairement anticipé Mandragot… inconsciemment j'étais déjà dans le scénario "tout basculer dans la collection Mandragot" 😄

Oui au final j'ai clairement volontairement anticipé Mandragot… inconsciemment j'étais déjà dans le scénario "tout basculer dans la collection Mandragot" 😄
@ -0,0 +22,4 @@
platforms:
- name: molecule_mgt_deploy_nextcloud
# Image to be used as a base
image: forge.mandragot.org/mandragot-docker/debian:bookworm
Owner

Comme dit plus haut, ça c'est pour mandragot, mais ici j'utilise mon image arch (qui correspond à mon infra).

Comme dit plus haut, ça c'est pour mandragot, mais ici j'utilise mon image arch (qui correspond à mon infra).
Author
First-time contributor

Idem

Idem
@ -2,12 +2,14 @@
bbl_admin_username: admin
bbl_cache_docker_tag: 7-alpine
bbl_cache_image: docker.io/redis
Owner

Ici ça devrait être docker.io/library/redis.

Ici ça devrait être `docker.io/library/redis`.
Author
First-time contributor

Oui on peut pas de pb, mais je ne me souviens plus pourquoi c'était important de mettre explicitement le library ? Pour le proxy ?

Oui on peut pas de pb, mais je ne me souviens plus pourquoi c'était important de mettre explicitement le `library` ? Pour le proxy ?
@ -4,3 +4,3 @@
bbl_cache_image: docker.io/redis
bbl_db_docker_tag: 10.5.9
bbl_db_docker_tag: 11.4
bbl_db_image: docker.io/mariadb
Owner

docker.io/library/mariadb

`docker.io/library/mariadb`
Author
First-time contributor

Idem

Idem
@ -7,3 +7,3 @@
bbl_default_phone_region: FR
bbl_nextcloud_docker_tag: "27"
bbl_nextcloud_docker_tag: "31"
bbl_nextcloud_image: docker.io/nextcloud
Owner

docker.io/library/nextcloud

`docker.io/library/nextcloud`
Author
First-time contributor

Idem

Idem
@ -31,3 +19,1 @@
- "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-cache"
- "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-db"
- "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-nextcloud"
- path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}"
Owner

Je trouve plus pratique de créer une variable _bbl_volume_directory: "{{ bbl_volume_directory }}/{{ bbl_service_name }} dans vars/main.yml et de l'utiliser partout. Ça simplifie un peu le code.

Je trouve plus pratique de créer une variable `_bbl_volume_directory: "{{ bbl_volume_directory }}/{{ bbl_service_name }}` dans `vars/main.yml` et de l'utiliser partout. Ça simplifie un peu le code.
Author
First-time contributor

Oui je suis d'accord. J'avais gardé comme c'était dans l'immédiat (objectif compose surtout), mais autant améliorer ça.

Oui je suis d'accord. J'avais gardé comme c'était dans l'immédiat (objectif compose surtout), mais autant améliorer ça.
@ -34,0 +23,4 @@
owner: "999"
group: "999"
- path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-db"
owner: "{{ ansible_facts.user_uid }}"
Owner

Ici il faudrait l'utilisateur 33 et le groupe 33.

Ici il faudrait l'utilisateur `33` et le groupe `33`.
Author
First-time contributor

Pourtant Redis alpine est bien sur un user 999 ?
Cf redis/docker-library-redis@8338d86bc3/7.4/alpine/Dockerfile (L13)
(avec group 1000 d'ailleurs, by bad)

Pourtant Redis alpine est bien sur un user 999 ? Cf https://github.com/redis/docker-library-redis/blob/8338d86bc3f7b195046138f8c31bf9a839cdedd3/7.4/alpine/Dockerfile#L13 (avec group 1000 d'ailleurs, by bad)
Owner

Je ne parle pas de redis, je parle de mariadb :)

Je ne parle pas de redis, je parle de mariadb :)
@ -34,0 +26,4 @@
owner: "{{ ansible_facts.user_uid }}"
group: "{{ ansible_facts.user_gid }}"
- path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-nextcloud"
owner: "{{ ansible_facts.user_uid }}"
Owner

Ici il faudrait l'utilisateur 999 et le groupe 999.

Ici il faudrait l'utilisateur `999` et le groupe `999`.
Author
First-time contributor

Oui en effet !

Oui en effet !
@ -19,6 +19,21 @@
changed_when: false
when: _bbl_new_install
- name: Database is configured in config.php
Owner

J'imagine que ça c'est pour palier un souci de db. Le Initializing finished de la tâche au dessus fonctionne bien même si la db est mal configurée ?

J'imagine que ça c'est pour palier un souci de db. Le `Initializing finished` de la tâche au dessus fonctionne bien même si la db est mal configurée ?
Author
First-time contributor

Oui, en fait c'est justement au premier lancement qu'il configure la connexion à la db, puis n'y retouchera jamais pas la suite. Donc on peut considérer qu'au premier lancement c'est à la charge de l'image de faire ce boulot, et par la suite nous on a cette nouvelle tâche qui s'assure que c'est bon et qui met à jour au besoin.

Oui, en fait c'est justement au premier lancement qu'il configure la connexion à la db, puis n'y retouchera jamais pas la suite. Donc on peut considérer qu'au premier lancement c'est à la charge de l'image de faire ce boulot, et par la suite nous on a cette nouvelle tâche qui s'assure que c'est bon et qui met à jour au besoin.
@ -9,3 +6,1 @@
- container_cache
- container_nextcloud
- container_cron
_bbl_volume_directory: "{{ bbl_volume_directory }}/{{ bbl_service_name }}"
Owner

Ah bah il est bien là ^^ Pourquoi ne pas l'utiliser dans main.yml et compose.yml.j2 ?

Ah bah il est bien là ^^ Pourquoi ne pas l'utiliser dans `main.yml` et `compose.yml.j2` ?
Author
First-time contributor

indeed!

indeed!
Author
First-time contributor

Pour les droits sur les répertoires, après vérif à coup de cat /etc/passwd dans chaque image utilisée, je pars sur ceci :

    - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}"
      owner: "{{ ansible_facts.user_uid }}"
      group: "{{ ansible_facts.user_gid }}"
    - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-cache"
      owner: "999"
      group: "1000"
    - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-db"
      owner: "999"
      group: "999"
    - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-nextcloud"
      owner: "33"
      group: "33"
Pour les droits sur les répertoires, après vérif à coup de `cat /etc/passwd` dans chaque image utilisée, je pars sur ceci : ```yaml - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}" owner: "{{ ansible_facts.user_uid }}" group: "{{ ansible_facts.user_gid }}" - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-cache" owner: "999" group: "1000" - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-db" owner: "999" group: "999" - path: "{{ bbl_volume_directory }}/{{ bbl_service_name }}/data-nextcloud" owner: "33" group: "33" ```
fix: nextcloud compose pr review
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
008b65eabf
Author
First-time contributor

Normalement tout est fixed, et re-testé dans molecule avec succès

Donc le plan :

  • on ne merge pas
  • renommages bbl en `mgt
  • nouvelle PR dans mgt.services à coup de copier-coller de cette branche
Normalement tout est fixed, et re-testé dans molecule avec succès ✅ Donc le plan : - on ne merge pas - renommages `bbl` en `mgt - nouvelle PR dans `mgt.services` à coup de copier-coller de cette branche
Some checks are pending
ci/woodpecker/pr/lint Pipeline is pending approval
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/nextcloud_compose:ezwen-feat/nextcloud_compose
git switch ezwen-feat/nextcloud_compose

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff ezwen-feat/nextcloud_compose
git switch ezwen-feat/nextcloud_compose
git rebase main
git switch main
git merge --ff-only ezwen-feat/nextcloud_compose
git switch ezwen-feat/nextcloud_compose
git rebase main
git switch main
git merge --no-ff ezwen-feat/nextcloud_compose
git switch main
git merge --squash ezwen-feat/nextcloud_compose
git switch main
git merge --ff-only ezwen-feat/nextcloud_compose
git switch main
git merge ezwen-feat/nextcloud_compose
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bbl-ansible/services!2
No description provided.