Compare commits

...

6 commits

Author SHA1 Message Date
3e33c9b70f
redis: update library and use the recently added #ping method
All checks were successful
Invidious CI / build (push) Successful in 6m45s
2025-04-13 15:53:54 -04:00
0ce17d91eb
chore(config): change server_id cookie name 2025-04-13 15:53:54 -04:00
c9eed028b0
ci: update to crystal 1.16.0 2025-04-13 15:53:42 -04:00
ff3d008a6f
ci: remove unused crystal spec from Dockerfile 2025-04-13 15:52:31 -04:00
49ae71a6ac
ci: only build production docker images 2025-04-13 15:52:08 -04:00
fac53ce721
ci: enable docker cache 2025-04-13 15:50:18 -04:00
5 changed files with 9 additions and 19 deletions

View file

@ -52,5 +52,5 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64
push: true
build-args: |
"release=1"
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -1,4 +1,4 @@
FROM mirror.gcr.io/crystallang/crystal:1.15.1-alpine AS builder
FROM mirror.gcr.io/crystallang/crystal:1.16.0-alpine AS builder
RUN apk add --no-cache sqlite-static yaml-static
@ -7,6 +7,7 @@ ARG release
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
COPY ./shard.lock ./shard.lock
RUN shards install --production
COPY ./src/ ./src/
@ -19,18 +20,11 @@ COPY ./scripts/ ./scripts/
COPY ./assets/ ./assets/
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
RUN --mount=type=cache,target=/root/.cache/crystal \
crystal build ./src/invidious.cr \
--release --mcpu=x86-64-v2 \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
else \
crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"; \
fi
--link-flags "-lxml2 -llzma";
FROM mirror.gcr.io/alpine:3.20
RUN apk add --no-cache rsvg-convert ttf-opensans tini tzdata

View file

@ -46,7 +46,7 @@ shards:
redis:
git: https://github.com/jgaskins/redis.git
version: 0.11.3
version: 0.12.0
spectator:
git: https://github.com/icy-arctic-fox/spectator.git

View file

@ -220,7 +220,7 @@ class Config
property pubsub_domain : String = ""
property server_id_cookie_name : String = "INVIDIOUS_SERVER_ID"
property server_id_cookie_name : String = "COMPANION_ID"
property tokens_server : String = ""

View file

@ -103,11 +103,7 @@ module Invidious::Database::Videos
@redis = Redis::Client.new(CONFIG.redis_url)
LOGGER.info "Video Cache: Using Redis compatible DB to store video cache"
LOGGER.info "Connecting to Redis compatible DB"
# #ping method is not available in this Redis library
# https://github.com/jgaskins/redis/issues/53
# if @redis.ping
if @redis.run({"PING"}) == "PONG"
# LOGGER.info "Connected to Redis compatible DB via unix domain socket at '#{CONFIG.redis_socket}'" if CONFIG.redis_socket
if @redis.ping
LOGGER.info "Connected to Redis compatible DB at '#{CONFIG.redis_url}'" if CONFIG.redis_url
end
end