nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
4.73k stars 559 forks source link

stalwart: Change maintainer #4811

Closed docjyJ closed 1 month ago

docjyJ commented 1 month ago

I see %AIO_CHANNEL%, is it working for AIO community containers ?

szaimen commented 1 month ago

I think this would not work

Actually it would but it requires all "normal" aio tags also to be existing for https://hub.docker.com/r/marcoambrosini/aio-stalwart/tags. So at least latest, beta and dev. So you will at least need to mantain all these tags in parallel if you want to do so.

Also you will sooner or later definitely run into this: https://github.com/nextcloud/all-in-one/discussions/4784#discussioncomment-9712152

docjyJ commented 1 month ago

Actually it would but it requires all "normal" aio tags also to be existing for https://hub.docker.com/r/marcoambrosini/aio-stalwart/tags. So at least latest, beta and dev. So you will at least need to mantain all these tags in parallel if you want to do so.

It's not necessary to maintain 3 tags. All 3 tags can point to the same container.

When upgrading, simply point the beta to the new container, and all beta users will receive the update without having to wait for an AIO beta.

And to release to all users, there's no need to be rushed by AIO beta deadlines.

Also you will sooner or later definitely run into this: https://github.com/nextcloud/all-in-one/discussions/4784#discussioncomment-9712152

For changes requiring json modification, you'll always have to go through JSON modification...

It would be really nice to have a solution for free version testing.

szaimen commented 1 month ago

Actually it would but it requires all "normal" aio tags also to be existing for https://hub.docker.com/r/marcoambrosini/aio-stalwart/tags. So at least latest, beta and dev. So you will at least need to mantain all these tags in parallel if you want to do so.

It's not necessary to maintain 3 tags. All 3 tags can point to the same container.

When upgrading, simply point the beta to the new container, and all beta users will receive the update without having to wait for an AIO beta.

And to release to all users, there's no need to be rushed by AIO beta deadlines.

I am fine with this change honestly but it gets more complicated for its maintainer imho...

Also you will sooner or later definitely run into this: #4784 (reply in thread)

For changes requiring json modification, you'll always have to go through JSON modification...

It would be really nice to have a solution for free version testing.

So what would be your suggestion?

docjyJ commented 1 month ago

V2.%AIO_CHANNEL% should work. In the case of complex changes (port, env...) adding a VX prefix would ensure that the correct volumes are mounted, etc.

I don't think it will be any more difficult.

With Github Repository and Github Actions, everything can be automated.

szaimen commented 1 month ago

V2.%AIO_CHANNEL% should work.

I fear this is going to break. See https://github.com/search?q=repo%3Anextcloud%2Fall-in-one%20AIO_CHANNEL&type=code. So in that case we would need to update the logic internally in order to allow for something like that.

docjyJ commented 1 month ago

Exemple of workflow :

name: Create and publish a Docker image

on:
  push:
    branches: 
      - 'latest'
      - 'beta'
      - 'dev'

env:
  aio_tag: v1-{{branch}}

jobs:
  build-and-push-image:
    name: Build and Push Docker image to GitHub Container Registry
    runs-on: ubuntu-latest

    permissions:
      contents: read
      packages: write
      attestations: write
      id-token: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Extract metadata (tags, labels) for Docker
        id: meta -V1
        uses: docker/metadata-action@v5
        with:
          images: ghcr.io/${{ github.repository }}
          tags: ${{ aio_tag }}

      - name: Log in to the GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Extract metadata (tags, labels) for Docker
        id: meta
        uses: docker/metadata-action@v5
        with:

      - name: Build and push Docker images
        id: push
        uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}

      - name: Generate artifact attestation
        uses: actions/attest-build-provenance@v1
        with:
          subject-name: ghcr.io/${{ github.repository }}
          subject-digest: ${{ steps.push.outputs.digest }}
          push-to-registry: true

When change volume port and other breaking :

It's can't be easier... 😅

docjyJ commented 1 month ago

V2.%AIO_CHANNEL% should work.

I fear this is going to break. See https://github.com/search?q=repo%3Anextcloud%2Fall-in-one%20AIO_CHANNEL&type=code. So in that case we would need to update the logic internally in order to allow for something like that.

Yes I think it's doesn't work...

szaimen commented 1 month ago

V2.%AIO_CHANNEL% should work.

I fear this is going to break. See https://github.com/search?q=repo%3Anextcloud%2Fall-in-one%20AIO_CHANNEL&type=code. So in that case we would need to update the logic internally in order to allow for something like that.

Yes I think it's doesn't work...

so this would need to be adjusted first

szaimen commented 1 month ago
on:
  push:
    branches: 
      - 'latest'
      - 'beta'
      - 'dev'

I made a mistake, instead of dev, the correct one is develop

docjyJ commented 1 month ago

V2.%AIO_CHANNEL% should work.

I fear this is going to break. See https://github.com/search?q=repo%3Anextcloud%2Fall-in-one%20AIO_CHANNEL&type=code. So in that case we would need to update the logic internally in order to allow for something like that.

Yes I think it's doesn't work...

so this would need to be adjusted first

If you think it's a good idea, I'll try to implement it.

szaimen commented 1 month ago

V2.%AIO_CHANNEL% should work.

I fear this is going to break. See https://github.com/search?q=repo%3Anextcloud%2Fall-in-one%20AIO_CHANNEL&type=code. So in that case we would need to update the logic internally in order to allow for something like that.

Yes I think it's doesn't work...

so this would need to be adjusted first

If you think it's a good idea, I'll try to implement it.

I don't think it is necessarily a good idea but I get the need from your side for such a feature. That is why I would be fine if you go ahead implementing this.

docjyJ commented 1 month ago

image

I use all aio branch.

docjyJ commented 1 month ago

I prefer to keep things as simple as possible, to avoid introducing bugs.

I will see about publishing on Docker Hub.

And I used the 3 channels, the Stalwart mail server is starting to become serious. Port and volume should not change.

For environment variables I can simply duplicate them (eg: if the MY_ENV variable has a new schema, I create MY_ENV_2 to ensure compatibility, and I possibly correct the rename in the script or config).

I think a lot of people would like a mail server associated with AIO. I would really like to provide stability. (And I would like to migrate my own config to integrate it into the backup)

docjyJ commented 1 month ago

DockerHub done: https://hub.docker.com/r/docjyj/aio-stalwart/tags

szaimen commented 4 weeks ago

This is now released with v9.1.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

docjyJ commented 3 weeks ago

Tested locally. Admin login and WebUI work !