Repository: static-web-server/static-web-server (language: rust)

Issue:
Consider moving all Docker images to the project's organization
**Is your feature request related to a problem? Please describe.**
Having container images tied to a person is a bit problematic for long term stability of the project I think, and considering it's already moved to an organisation on GitHub, it'd probably be a good step to do the same on docker hub, or to just use GitHub Container Registry directly instead of relying on a third party.

**Describe the solution you'd like**
Instead of pushing to `docker.io/joseluisq/static-web-server`, consider pushing to `docker.io/static-web-server/static-web-server` or `ghcr.io/static-web-server/static-web-server`.

**Describe alternatives you've considered**
None

**Additional context**
I've started using `sws` in a private context (hosting https://jcg.re on it) and considering it in a professional context as well. For that, I'd like to make sure it's not just a single person side project though, and the container image being tied to a single person indicates that to me.

EDIT: Just to make sure: I don't mean "just a single person side project" as a way to talk down on the project. It's a tremendous project and I'm very happy with it, but for professional usage we'd want it to be somewhat stable from an organizational standpoint as well. A BDFL introduces a single point of failure here, which is the reason why I'm somewhat hesitant when I see projects with one instead of a group of people maintaining it. At the same time, I of course see that finding people who are capable and willing to maintain software and that are trustworthy enough to give them commit access is also difficult.

The reason I'm looking into `sws`, is because I want an http server that handles serving static files, is written in a memory safe, highly performant language, but not much more. Caddy is what I've been using before, but with dynamic configuration, reverse proxy features, built-in ACME and so many other features, it's not quite what I want for the job here. `sws` isn't a perfect fit either, considering it handles TLS and such things as well, but it's scope is still a lot more limited than what Caddy does.


Discussion / hints:
Sure, in fact, this was one of the leftovers of our last organizational move.

About publishing the images to GHCR or DockerHub organization I will have a look because it could be both for user variety of options.

I will share more here once I have the time.
As I said before, I'm interested in providing Docker images via DockerHub as well as Github Container Registry.
Here is the plan of how to proceed with this.

**DockerHub**

Unfortunately, having an organization for my current user on DockerHub is not as easy and flexible as having one on GitHub for example. And if I want that then I could incur [paying monthly](https://docs.docker.com/docker-hub/orgs/#create-an-organization) which is something that I can not afford for now.

So we will continue supporting the current `docker.io/joseluisq/static-web-server` on DockerHub.

**GitHub Container Registry**

Here is where we could provide the Docker images for the current Github organization via `ghcr.io/static-web-server/static-web-server`.
This should be enough as an alternative for organizations interested in the project as mentioned in the feature request.

--

In summary, the Docker images via DockerHub remain the same and we will support new images for the GitHub organization via ghcr.io.

So stay tuned.

Fix patch:
diff --git a/.github/workflows/release.docker.yml b/.github/workflows/release.docker.yml
index b3ce8f5b..fdf609fe 100644
--- a/.github/workflows/release.docker.yml
+++ b/.github/workflows/release.docker.yml
@@ -22,7 +22,9 @@ jobs:
         id: meta_alpine
         uses: docker/metadata-action@v4
         with:
-          images: joseluisq/static-web-server
+          images: |
+            joseluisq/static-web-server
+            ghcr.io/static-web-server/static-web-server
           flavor: |
             latest=false
             suffix=-alpine
@@ -39,12 +41,18 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
+      -
+        name: Login to ghcr.io
+        uses: docker/login-action@v2
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
       -
         name: Prepare Docker envs
         shell: bash
         run: |
           echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
-          echo "SERVER_DOCKERFILE=./docker/alpine/Dockerfile" >> $GITHUB_ENV
       -
         name: Build and push (alpine)
         uses: docker/build-push-action@v4
@@ -52,7 +60,7 @@ jobs:
           push: true
           context: .
           platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
-          file: ${{ env.SERVER_DOCKERFILE }}
+          file: ./docker/alpine/Dockerfile
           tags: ${{ steps.meta_alpine.outputs.tags }}
           build-args: |
             SERVER_VERSION=${{ env.SERVER_VERSION }}
@@ -75,7 +83,9 @@ jobs:
         id: meta_debian
         uses: docker/metadata-action@v4
         with:
-          images: joseluisq/static-web-server
+          images: |
+            joseluisq/static-web-server
+            ghcr.io/static-web-server/static-web-server
           flavor: |
             latest=false
             suffix=-debian
@@ -92,12 +102,18 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
+      -
+        name: Login to ghcr.io
+        uses: docker/login-action@v2
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
       -
         name: Prepare Docker envs
         shell: bash
         run: |
           echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
-          echo "SERVER_DOCKERFILE=./docker/debian/Dockerfile" >> $GITHUB_ENV
       -
         name: Build and push (debian)
         uses: docker/build-push-action@v4
@@ -105,7 +121,7 @@ jobs:
           push: true
           context: .
           platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
-          file: ${{ env.SERVER_DOCKERFILE }}
+          file: ./docker/debian/Dockerfile
           tags: ${{ steps.meta_debian.outputs.tags }}
           build-args: |
             SERVER_VERSION=${{ env.SERVER_VERSION }}
@@ -127,7 +143,9 @@ jobs:
         id: meta_scratch
         uses: docker/metadata-action@v4
         with:
-          images: joseluisq/static-web-server
+          images: |
+            joseluisq/static-web-server
+            ghcr.io/static-web-server/static-web-server
           tags: |
             type=semver,pattern={{version}}
             type=semver,pattern={{major}}.{{minor}}
@@ -141,12 +159,18 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
+      -
+        name: Login to ghcr.io
+        uses: docker/login-action@v2
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
       -
         name: Prepare Docker envs
         shell: bash
         run: |
           echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
-          echo "SERVER_DOCKERFILE=./docker/scratch/Dockerfile" >> $GITHUB_ENV
       -
         name: Build and push (scratch)
         uses: docker/build-push-action@v4
@@ -154,7 +178,7 @@ jobs:
           push: true
           context: .
           platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
-          file: ${{ env.SERVER_DOCKERFILE }}
+          file: ./docker/scratch/Dockerfile
           tags: ${{ steps.meta_scratch.outputs.tags }}
           build-args: |
             SERVER_VERSION=${{ env.SERVER_VERSION }}


Test patch: