Switch all images to the new registry (#1109)

* Switch all images to the new registry

* Update compose files

* Update Readme

* Fix several merge issues.

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2024-11-03 08:42:37 +02:00
committed by GitHub
parent 0d5225e542
commit 0fb6636ead
5 changed files with 59 additions and 39 deletions

View File

@@ -14,10 +14,10 @@ on:
env: env:
IS_PUSHING_IMAGES: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }} IS_PUSHING_IMAGES: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
# IS_PUSHING_IMAGES: true # Switch on when pushing images with forked repos. # IS_PUSHING_IMAGES: true # Switch on when pushing images with forked repos.
DOCKER_REGISTRY: ${{ (github.repository == 'photoview/photoview' && '') || 'ghcr.io/' }} DOCKER_REGISTRY: ${{ github.repository != 'photoview/photoview' && 'ghcr.io/' || '' }}
DOCKER_USERNAME: viktorstrate DOCKER_USERNAME: viktorstrate
DOCKER_IMAGE: ${{ (github.repository == 'photoview/photoview' && 'viktorstrate/photoview') || github.repository }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_IMAGE: ${{ github.repository }}
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7 PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
jobs: jobs:
@@ -91,9 +91,9 @@ jobs:
if: ${{ env.IS_PUSHING_IMAGES == 'true' }} if: ${{ env.IS_PUSHING_IMAGES == 'true' }}
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && 'ghcr.io' }} registry: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && 'ghcr.io' || '' }}
username: ${{ ( env.DOCKER_REGISTRY == 'ghcr.io/' && github.actor ) || env.DOCKER_USERNAME }} username: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && github.actor || env.DOCKER_USERNAME }}
password: ${{ ( env.DOCKER_REGISTRY == 'ghcr.io/' && github.token ) || env.DOCKER_PASSWORD }} password: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && github.token || env.DOCKER_PASSWORD }}
- name: Docker meta - name: Docker meta
id: docker_meta id: docker_meta
@@ -114,17 +114,17 @@ jobs:
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
sbom: true sbom: true
provenance: mode=max provenance: mode=max
platforms: ${{ env.PLATFORMS }} platforms: ${{ env.PLATFORMS }}
pull: true pull: true
push: ${{ env.IS_PUSHING_IMAGES }} push: ${{ env.IS_PUSHING_IMAGES }}
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
annotations: ${{ steps.docker_meta.outputs.annotations }} annotations: ${{ steps.docker_meta.outputs.annotations }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
build-args: | build-args: |
NODE_ENV=production NODE_ENV=production
VERSION=${{ github.ref_name }} VERSION=${{ github.ref_name }}
@@ -140,6 +140,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
tags: ${{ fromJson(needs.prepare.outputs.tags) }} tags: ${{ fromJson(needs.prepare.outputs.tags) }}
# Comment out when pushing images with forked repos.
if: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }} if: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
steps: steps:
# Makes sure your .dockleignore file is available to the next step # Makes sure your .dockleignore file is available to the next step
@@ -151,8 +152,9 @@ jobs:
- name: Docker Login - name: Docker Login
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ env.DOCKER_USERNAME }} registry: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && 'ghcr.io' || '' }}
password: ${{ env.DOCKER_PASSWORD }} username: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && github.actor || env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && github.token || env.DOCKER_PASSWORD }}
- name: Run Dockle for '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}' - name: Run Dockle for '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
id: dockle id: dockle
@@ -160,12 +162,12 @@ jobs:
continue-on-error: true continue-on-error: true
uses: erzz/dockle-action@v1 uses: erzz/dockle-action@v1
with: with:
image: '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}' image: '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
report-name: dockle-results-${{ matrix.tags.tag }} report-name: dockle-results-${{ matrix.tags.tag }}
report-format: sarif report-format: sarif
failure-threshold: fatal failure-threshold: fatal
exit-code: 1 exit-code: 1
timeout: 5m timeout: 5m
- name: Upload SARIF file - name: Upload SARIF file
if: ${{ steps.dockle.conclusion == 'success' }} if: ${{ steps.dockle.conclusion == 'success' }}

View File

@@ -64,7 +64,7 @@ RUN chmod +x /app/scripts/*.sh \
&& /app/scripts/install_build_dependencies.sh \ && /app/scripts/install_build_dependencies.sh \
&& /app/scripts/install_runtime_dependencies.sh && /app/scripts/install_runtime_dependencies.sh
COPY --from=viktorstrate/dependencies /artifacts.tar.gz /dependencies/ COPY --from=photoview/dependencies /artifacts.tar.gz /dependencies/
# Split values in `/env` # Split values in `/env`
# hadolint ignore=SC2046 # hadolint ignore=SC2046
RUN export $(cat /env) \ RUN export $(cat /env) \

View File

@@ -17,25 +17,43 @@ When your media has been scanned, they show up on the website, organised in the
> If you have questions regarding setup or development, > If you have questions regarding setup or development,
feel free to join the Discord server https://discord.gg/jQ392948u9 feel free to join the Discord server https://discord.gg/jQ392948u9
# ATTENTION to Docker users !!!
We migrated to the new Docker registry <https://hub.docker.com/r/photoview/photoview> and all new images for the `master` tag, as well as future releases are going to be published there instead of the previously used registry. Old images will be still accessible in the old registry <https://hub.docker.com/r/viktorstrate/photoview>, so if you want to use 1 of those old images, you need to revert back to the old registry.
Please update your `docker-compose.yml` file to use the new registry for the `photoview` image, as shown in the corresponding example of the compose file: <https://github.com/photoview/photoview/tree/master/docker-compose%20example>
## Demo site ## Demo site
Visit https://photos.qpqp.dk/ Visit https://photos.qpqp.dk/
Username: **demo** Username: **demo**
Password: **demo** Password: **demo**
## Contents ## Contents
- [Demo site](#demo-site) - [ATTENTION to Docker users !!!](#attention-to-docker-users-)
- [Main features](#main-features) - [Demo site](#demo-site)
- [Supported Platforms](#supported-platforms) - [Contents](#contents)
- [Why yet another self-hosted photo gallery](#why-yet-another-self-hosted-photo-gallery) - [Main features](#main-features)
- [Getting started — Setup with Docker](#getting-started--setup-with-docker) - [Supported platforms](#supported-platforms)
- [Advanced setup](#advanced-setup) - [Why yet another self-hosted photo gallery](#why-yet-another-self-hosted-photo-gallery)
- [Contributing](#contributing) - [Getting started — Setup with Docker](#getting-started--setup-with-docker)
- [Set up Docker development environment](#set-up-docker-development-environment) - [Initial Setup](#initial-setup)
- [Set up local development environment](#set-up-local-development-environment) - [Advanced setup](#advanced-setup)
- [Sponsors](#sponsors) - [Hardware Acceleration](#hardware-acceleration)
- [Contributing](#contributing)
- [Set up Docker development environment](#set-up-docker-development-environment)
- [Start API and UI server with Docker Compose](#start-api-and-ui-server-with-docker-compose)
- [Start API server with Docker](#start-api-server-with-docker)
- [Start UI server with Docker](#start-ui-server-with-docker)
- [Set up local development environment](#set-up-local-development-environment)
- [Install dependencies](#install-dependencies)
- [Local setup](#local-setup)
- [Start API server](#start-api-server)
- [Start UI server](#start-ui-server)
- [Sponsors](#sponsors)
## Main features ## Main features
@@ -171,10 +189,10 @@ If you verify other hardware accelerations working well, let us know.
🎉 First off, thanks for your interest in contribution! 🎉 🎉 First off, thanks for your interest in contribution! 🎉
This project is a result of hard work, and it's great to see you interested in contributing. This project is a result of hard work, and it's great to see you interested in contributing.
Contributions are not just about code — you can help in many ways! Contributions are not just about code — you can help in many ways!
Before you start, please take a moment to read our [Contributing guide](./CONTRIBUTING.md). Before you start, please take a moment to read our [Contributing guide](./CONTRIBUTING.md).
It includes information on our code of conduct, the process for submitting pull requests, and more. It includes information on our code of conduct, the process for submitting pull requests, and more.
Remember, every contribution counts. Let's make this project better together! 💪 Remember, every contribution counts. Let's make this project better together! 💪
@@ -254,10 +272,10 @@ We can't keep verifying below commands on each environment. People may need to s
- `g++` - `g++`
- `libc-dev` - `libc-dev`
- `libheif` >= 1.15.1 - `libheif` >= 1.15.1
- [go-face Requirements](https://github.com/Kagami/go-face#requirements) - [go-face Requirements](https://github.com/Kagami/go-face#requirements)
- `dlib` - `dlib`
- `libjpeg` - `libjpeg`
- `libblas` - `libblas`
- `libcblas`, recommended using `libatlas-base` in Debian. - `libcblas`, recommended using `libatlas-base` in Debian.
- `liblapack` - `liblapack`
- Optional tools during developing: - Optional tools during developing:

View File

@@ -1,6 +1,6 @@
services: services:
photoview: photoview:
image: viktorstrate/photoview:2 image: photoview/photoview:2
labels: labels:
- "com.centurylinklabs.watchtower.enable=true" - "com.centurylinklabs.watchtower.enable=true"
hostname: photoview hostname: photoview

View File

@@ -1,6 +1,6 @@
services: services:
photoview: photoview:
image: viktorstrate/photoview:2 image: photoview/photoview:2
hostname: photoview hostname: photoview
container_name: photoview container_name: photoview
restart: unless-stopped restart: unless-stopped