From ffa9e5dfab7a1d7ea84d88007107f9f40295c50a Mon Sep 17 00:00:00 2001 From: Andre Borie Date: Sun, 17 Jan 2021 01:44:31 +0000 Subject: Make migrations (mostly) idempotent. --- docker/init-invidious-db.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docker') diff --git a/docker/init-invidious-db.sh b/docker/init-invidious-db.sh index 3808e673..cc0e1c3f 100755 --- a/docker/init-invidious-db.sh +++ b/docker/init-invidious-db.sh @@ -5,12 +5,12 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E CREATE USER postgres; EOSQL -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/users.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/session_ids.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/nonces.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/annotations.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlists.sql -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlist_videos.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/users.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/session_ids.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/nonces.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/annotations.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlists.sql +psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/playlist_videos.sql -- cgit v1.2.3 From 392a363d02142026f717f44381b043f199918489 Mon Sep 17 00:00:00 2001 From: syeopite Date: Tue, 8 Jun 2021 13:20:46 -0700 Subject: Update Dockerfile for crystal 1.0 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 87884403..b8e5af8a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:0.36.1-alpine AS builder +FROM crystallang/crystal:1.0.0-alpine AS builder RUN apk add --no-cache curl sqlite-static yaml-static WORKDIR /invidious COPY ./shard.yml ./shard.yml -- cgit v1.2.3 From aa3608f0af0e13876053d0a5bfe3e860de123342 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Thu, 15 Jul 2021 23:57:20 +0200 Subject: Include liblsquic build in dockerfile + add support for ARM64 on Docker (#2147) Co-authored-by: Emilien Devos --- .github/workflows/container-release.yml | 35 ++++++++++++++++- docker/APKBUILD-boringssl | 46 +++++++++++++++++++++++ docker/APKBUILD-lsquic | 43 +++++++++++++++++++++ docker/Dockerfile | 40 ++++++++++++++++++-- docker/Dockerfile.arm64 | 66 +++++++++++++++++++++++++++++++++ 5 files changed, 226 insertions(+), 4 deletions(-) create mode 100644 docker/APKBUILD-boringssl create mode 100644 docker/APKBUILD-lsquic create mode 100644 docker/Dockerfile.arm64 (limited to 'docker') diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 1f811b7c..756374da 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -17,6 +17,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v1 + with: + platforms: arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -28,12 +30,43 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - name: Build and push for Push Event + - name: Cache Docker layers + if: github.ref == 'refs/heads/master' + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-multi-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-multi-buildx + + - name: Build and push Docker AMD64 image for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v2 with: context: . file: docker/Dockerfile + platforms: linux/amd64 labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new + + - name: Build and push Docker ARM64 image for Push Event + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v2 + with: + context: . + file: docker/Dockerfile.arm64 + platforms: linux/arm64/v8 + labels: quay.expires-after=12w + push: true + tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new + + - name: Override old Docker cache + if: github.ref == 'refs/heads/master' + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/docker/APKBUILD-boringssl b/docker/APKBUILD-boringssl new file mode 100644 index 00000000..61caa4f1 --- /dev/null +++ b/docker/APKBUILD-boringssl @@ -0,0 +1,46 @@ +# Based on https://aur.archlinux.org/packages/boringssl-git/ +# Maintainer: Omar Roth +pkgname=boringssl +pkgver=1.1.0 +pkgrel=0 +pkgdesc="BoringSSL is a fork of OpenSSL that is designed to meet Google's needs" +url="https://boringssl.googlesource.com/boringssl" +arch="all" +license="MIT" +replaces="openssl libressl" +depends="!openssl-libs-static" +makedepends_host="linux-headers" +makedepends="cmake git go perl" +subpackages="$pkgname-static $pkgname-dev $pkgname-doc" +source="251b516.tar.gz::https://github.com/google/boringssl/tarball/251b516" +builddir="$srcdir/google-boringssl-251b516" + +prepare() { + : +} + +build() { + cmake -DCMAKE_BUILD_TYPE=Release . + make ssl crypto +} + +check() { + make all_tests +} + +package() { + for i in *.md ; do + install -Dm644 $i "$pkgdir/usr/share/doc/$pkgname/$i" + done + install -d "$pkgdir/usr/lib" + install -d "$pkgdir/usr/include" + cp -R include/openssl "$pkgdir/usr/include" + + install -Dm755 crypto/libcrypto.a "$pkgdir/usr/lib/libcrypto.a" + install -Dm755 ssl/libssl.a "$pkgdir/usr/lib/libssl.a" +# install -Dm755 decrepit/libdecrepit.a "$pkgdir/usr/lib/libdecrepit.a" +# install -Dm755 libboringssl_gtest.a "$pkgdir/usr/lib/libboringssl_gtest.a" +} +sha512sums=" +b1d42ed188cf0cce89d40061fa05de85b387ee4244f1236ea488a431536a2c6b657b4f03daed0ac9328c7f5c4c9330499283b8a67f1444dcf9ba5e97e1199c4e 251b516.tar.gz +" diff --git a/docker/APKBUILD-lsquic b/docker/APKBUILD-lsquic new file mode 100644 index 00000000..51630a0e --- /dev/null +++ b/docker/APKBUILD-lsquic @@ -0,0 +1,43 @@ +# Maintainer: Omar Roth +pkgname=lsquic +pkgver=2.18.1 +pkgrel=0 +pkgdesc="LiteSpeed QUIC and HTTP/3 Library" +url="https://github.com/litespeedtech/lsquic" +arch="all" +license="MIT" +depends="boringssl-dev boringssl-static zlib-static libevent-static" +makedepends="cmake git go perl bsd-compat-headers linux-headers" +subpackages="$pkgname-static" +source="v$pkgver.tar.gz::https://github.com/litespeedtech/lsquic/tarball/v2.18.1 +ls-qpack-$pkgver.tar.gz::https://github.com/litespeedtech/ls-qpack/tarball/a8ae6ef +ls-hpack-$pkgver.tar.gz::https://github.com/litespeedtech/ls-hpack/tarball/bd5d589" +builddir="$srcdir/litespeedtech-$pkgname-692a910" + +prepare() { + cp -r -T "$srcdir/litespeedtech-ls-qpack-a8ae6ef" "$builddir/src/liblsquic/ls-qpack" + cp -r -T "$srcdir/litespeedtech-ls-hpack-bd5d589" "$builddir/src/lshpack" +} + +build() { + cmake \ + -DCMAKE_BUILD_TYPE=None \ + -DBORINGSSL_INCLUDE=/usr/include/openssl \ + -DBORINGSSL_LIB_crypto=/usr/lib \ + -DBORINGSSL_LIB_ssl=/usr/lib . + make lsquic +} + +check() { + make tests +} + +package() { + install -d "$pkgdir/usr/lib" + install -Dm755 src/liblsquic/liblsquic.a "$pkgdir/usr/lib/liblsquic.a" +} +sha512sums=" +d015a72f1e88750ecb364768a40f532678f11ded09c6447a2e698b20f43fa499ef143a53f4c92a5938dfece0e39e687dc9df4aea97c618faee0c63da771561c3 v2.18.1.tar.gz +c5629085a3881815fb0b72a321eeba8de093eff9417b8ac7bde1ee1264971be0dca6d61d74799b02ae03a4c629b2a9cf21387deeb814935339a8a2503ea33fee ls-qpack-2.18.1.tar.gz +1b9f7ce4c82dadfca8154229a415b0335a61761eba698f814d4b94195c708003deb5cb89318a1ab78ac8fa88b141bc9df283fb1c6e40b3ba399660feaae353a0 ls-hpack-2.18.1.tar.gz +" diff --git a/docker/Dockerfile b/docker/Dockerfile index b8e5af8a..9a535414 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,44 @@ +FROM alpine:edge AS liblsquic-builder +WORKDIR /src + +RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers + +RUN abuild-keygen -a -n && \ + cp /root/.abuild/-*.rsa.pub /etc/apk/keys/ + +COPY docker/APKBUILD-boringssl boringssl/APKBUILD +RUN cd boringssl && abuild -F -r && cd .. + +RUN apk add --repository /root/packages/src boringssl boringssl-dev boringssl-static + +RUN apk add --no-cache zlib-dev zlib-static libevent-dev libevent-static + +COPY docker/APKBUILD-lsquic lsquic/APKBUILD +RUN cd lsquic && abuild -F -r && cd .. + +RUN apk add --repository /root/packages/src lsquic-static + +RUN mkdir tmp && cd tmp && \ + ar -x /usr/lib/libssl.a && \ + ar -x /usr/lib/libcrypto.a && \ + ar -x /usr/lib/liblsquic.a && \ + ar rc liblsquic.a *.o && \ + strip --strip-unneeded liblsquic.a && \ + ranlib liblsquic.a && \ + cp liblsquic.a /root/liblsquic.a && \ + cd .. && rm -rf tmp + + FROM crystallang/crystal:1.0.0-alpine AS builder -RUN apk add --no-cache curl sqlite-static yaml-static +RUN apk add --no-cache sqlite-static yaml-static + WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock -RUN shards install && \ - curl -Lo ./lib/lsquic/src/lsquic/ext/liblsquic.a https://github.com/iv-org/lsquic-static-alpine/releases/download/v2.18.1/liblsquic.a +RUN shards install + +COPY --from=liblsquic-builder /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a + COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 new file mode 100644 index 00000000..1ec95d8a --- /dev/null +++ b/docker/Dockerfile.arm64 @@ -0,0 +1,66 @@ +FROM alpine:3.14 AS liblsquic-builder +WORKDIR /src + +RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers + +RUN abuild-keygen -a -n && \ + cp /root/.abuild/-*.rsa.pub /etc/apk/keys/ + +COPY docker/APKBUILD-boringssl boringssl/APKBUILD +RUN cd boringssl && abuild -F -r && cd .. + +RUN apk add --repository /root/packages/src boringssl boringssl-dev boringssl-static + +RUN apk add --no-cache zlib-dev zlib-static libevent-dev libevent-static + +COPY docker/APKBUILD-lsquic lsquic/APKBUILD +RUN cd lsquic && abuild -F -r && cd .. + +RUN apk add --repository /root/packages/src lsquic-static + +RUN mkdir tmp && cd tmp && \ + ar -x /usr/lib/libssl.a && \ + ar -x /usr/lib/libcrypto.a && \ + ar -x /usr/lib/liblsquic.a && \ + ar rc liblsquic.a *.o && \ + strip --strip-unneeded liblsquic.a && \ + ranlib liblsquic.a && \ + cp liblsquic.a /root/liblsquic.a && \ + cd .. && rm -rf tmp + + +FROM alpine:3.14 AS builder +RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev + +WORKDIR /invidious +COPY ./shard.yml ./shard.yml +COPY ./shard.lock ./shard.lock +RUN shards install + +COPY --from=liblsquic-builder /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a + +COPY ./src/ ./src/ +# TODO: .git folder is required for building – this is destructive. +# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. +COPY ./.git/ ./.git/ +RUN crystal build ./src/invidious.cr \ + --static --warnings all \ + --link-flags "-lxml2 -llzma" + +FROM alpine:latest +RUN apk add --no-cache librsvg ttf-opensans +WORKDIR /invidious +RUN addgroup -g 1000 -S invidious && \ + adduser -u 1000 -S invidious -G invidious +COPY ./assets/ ./assets/ +COPY --chown=invidious ./config/config.* ./config/ +RUN mv -n config/config.example.yml config/config.yml +RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml +COPY ./config/sql/ ./config/sql/ +COPY ./locales/ ./locales/ +COPY --from=builder /invidious/invidious . +RUN chmod o+rX -R ./assets ./config ./locales + +EXPOSE 3000 +USER invidious +CMD [ "/invidious/invidious" ] -- cgit v1.2.3 From 637a5cc14ff50f92d08a21bedd529442b8698f85 Mon Sep 17 00:00:00 2001 From: syeopite <70992037+syeopite@users.noreply.github.com> Date: Mon, 9 Aug 2021 22:34:52 -0700 Subject: Add CI for testing arm64 docker (#2315) * Add CI for testing build of docker-arm64 * Add specs check to dockerfiles --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ docker/Dockerfile | 4 ++++ docker/Dockerfile.arm64 | 4 ++++ 3 files changed, 34 insertions(+) (limited to 'docker') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00302f28..fa6f9e33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,3 +91,29 @@ jobs: - name: Test Docker run: while curl -Isf http://localhost:3000; do sleep 1; done + build-docker-arm64: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build Docker ARM64 image + uses: docker/build-push-action@v2 + with: + context: . + file: docker/Dockerfile.arm64 + platforms: linux/arm64/v8 + + - name: Test Docker + run: while curl -Isf http://localhost:3000; do sleep 1; done + + diff --git a/docker/Dockerfile b/docker/Dockerfile index 9a535414..0b6c6ceb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,6 +43,10 @@ COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. COPY ./.git/ ./.git/ + +RUN crystal spec --warnings all \ + --link-flags "-lxml2 -llzma" + RUN crystal build ./src/invidious.cr \ --static --warnings all \ --link-flags "-lxml2 -llzma" diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 1ec95d8a..54226b66 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -43,6 +43,10 @@ COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. COPY ./.git/ ./.git/ + +RUN crystal spec --warnings all \ + --link-flags "-lxml2 -llzma" + RUN crystal build ./src/invidious.cr \ --static --warnings all \ --link-flags "-lxml2 -llzma" -- cgit v1.2.3 From f2b69fd8120c4e2d98ba95eb412c1d771b820b7b Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Thu, 12 Aug 2021 23:33:28 +0200 Subject: bump crystal docker image version + use alpine:edge docker image in order to use crystal 1.1.1 --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 0b6c6ceb..7742ee39 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir tmp && cd tmp && \ cd .. && rm -rf tmp -FROM crystallang/crystal:1.0.0-alpine AS builder +FROM crystallang/crystal:1.1.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static WORKDIR /invidious diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 54226b66..7929d67b 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM alpine:3.14 AS liblsquic-builder +FROM alpine:edge AS liblsquic-builder WORKDIR /src RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers @@ -29,7 +29,7 @@ RUN mkdir tmp && cd tmp && \ cd .. && rm -rf tmp -FROM alpine:3.14 AS builder +FROM alpine:edge AS builder RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev WORKDIR /invidious -- cgit v1.2.3 From 46f8b04e40e4991619d61660143f37b30a038b5b Mon Sep 17 00:00:00 2001 From: syeopite Date: Thu, 12 Aug 2021 16:10:40 -0700 Subject: Revert "bump crystal docker image version +" This reverts commit f2b69fd8120c4e2d98ba95eb412c1d771b820b7b. Crystal 1.1.0 is not supported by Invidious due to upstream issue. See crystal-lang/crystal#10972 --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 7742ee39..0b6c6ceb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir tmp && cd tmp && \ cd .. && rm -rf tmp -FROM crystallang/crystal:1.1.1-alpine AS builder +FROM crystallang/crystal:1.0.0-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static WORKDIR /invidious diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 7929d67b..54226b66 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM alpine:edge AS liblsquic-builder +FROM alpine:3.14 AS liblsquic-builder WORKDIR /src RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers @@ -29,7 +29,7 @@ RUN mkdir tmp && cd tmp && \ cd .. && rm -rf tmp -FROM alpine:edge AS builder +FROM alpine:3.14 AS builder RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev WORKDIR /invidious -- cgit v1.2.3 From c60fccd7f67d666076a2055fe248c35f1dba2fc2 Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Fri, 13 Aug 2021 08:44:44 +0200 Subject: Update crystal docker image to 1.1.1 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 0b6c6ceb..7742ee39 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir tmp && cd tmp && \ cd .. && rm -rf tmp -FROM crystallang/crystal:1.0.0-alpine AS builder +FROM crystallang/crystal:1.1.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static WORKDIR /invidious -- cgit v1.2.3 From d78e5281fe1ad993881e4ee77fd7ea42ee252213 Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Tue, 24 Aug 2021 23:12:19 +0200 Subject: use pre-compiled lsquic docker image from https://quay.io/repository/invidious/lsquic-compiled fixes #2325 --- docker/Dockerfile | 33 +-------------------------------- docker/Dockerfile.arm64 | 33 +-------------------------------- 2 files changed, 2 insertions(+), 64 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 7742ee39..d3d69af6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,34 +1,3 @@ -FROM alpine:edge AS liblsquic-builder -WORKDIR /src - -RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers - -RUN abuild-keygen -a -n && \ - cp /root/.abuild/-*.rsa.pub /etc/apk/keys/ - -COPY docker/APKBUILD-boringssl boringssl/APKBUILD -RUN cd boringssl && abuild -F -r && cd .. - -RUN apk add --repository /root/packages/src boringssl boringssl-dev boringssl-static - -RUN apk add --no-cache zlib-dev zlib-static libevent-dev libevent-static - -COPY docker/APKBUILD-lsquic lsquic/APKBUILD -RUN cd lsquic && abuild -F -r && cd .. - -RUN apk add --repository /root/packages/src lsquic-static - -RUN mkdir tmp && cd tmp && \ - ar -x /usr/lib/libssl.a && \ - ar -x /usr/lib/libcrypto.a && \ - ar -x /usr/lib/liblsquic.a && \ - ar rc liblsquic.a *.o && \ - strip --strip-unneeded liblsquic.a && \ - ranlib liblsquic.a && \ - cp liblsquic.a /root/liblsquic.a && \ - cd .. && rm -rf tmp - - FROM crystallang/crystal:1.1.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static @@ -37,7 +6,7 @@ COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock RUN shards install -COPY --from=liblsquic-builder /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a +COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 54226b66..84084a06 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,34 +1,3 @@ -FROM alpine:3.14 AS liblsquic-builder -WORKDIR /src - -RUN apk add --no-cache build-base git apk-tools abuild cmake go perl linux-headers - -RUN abuild-keygen -a -n && \ - cp /root/.abuild/-*.rsa.pub /etc/apk/keys/ - -COPY docker/APKBUILD-boringssl boringssl/APKBUILD -RUN cd boringssl && abuild -F -r && cd .. - -RUN apk add --repository /root/packages/src boringssl boringssl-dev boringssl-static - -RUN apk add --no-cache zlib-dev zlib-static libevent-dev libevent-static - -COPY docker/APKBUILD-lsquic lsquic/APKBUILD -RUN cd lsquic && abuild -F -r && cd .. - -RUN apk add --repository /root/packages/src lsquic-static - -RUN mkdir tmp && cd tmp && \ - ar -x /usr/lib/libssl.a && \ - ar -x /usr/lib/libcrypto.a && \ - ar -x /usr/lib/liblsquic.a && \ - ar rc liblsquic.a *.o && \ - strip --strip-unneeded liblsquic.a && \ - ranlib liblsquic.a && \ - cp liblsquic.a /root/liblsquic.a && \ - cd .. && rm -rf tmp - - FROM alpine:3.14 AS builder RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev @@ -37,7 +6,7 @@ COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock RUN shards install -COPY --from=liblsquic-builder /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a +COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. -- cgit v1.2.3 From 33724d40a81f174303f3881a4d185270c441ac6a Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Tue, 24 Aug 2021 23:15:41 +0200 Subject: moved APKBUILD files to iv-org/lsquic.cr/docker and remove docker cache --- .github/workflows/container-release.yml | 21 +-------------- docker/APKBUILD-boringssl | 46 --------------------------------- docker/APKBUILD-lsquic | 43 ------------------------------ 3 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 docker/APKBUILD-boringssl delete mode 100644 docker/APKBUILD-lsquic (limited to 'docker') diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 756374da..9cc39783 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -30,15 +30,6 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - name: Cache Docker layers - if: github.ref == 'refs/heads/master' - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-multi-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-multi-buildx - - name: Build and push Docker AMD64 image for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v2 @@ -49,8 +40,6 @@ jobs: labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - name: Build and push Docker ARM64 image for Push Event if: github.ref == 'refs/heads/master' @@ -61,12 +50,4 @@ jobs: platforms: linux/arm64/v8 labels: quay.expires-after=12w push: true - tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - - - name: Override old Docker cache - if: github.ref == 'refs/heads/master' - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 \ No newline at end of file diff --git a/docker/APKBUILD-boringssl b/docker/APKBUILD-boringssl deleted file mode 100644 index 61caa4f1..00000000 --- a/docker/APKBUILD-boringssl +++ /dev/null @@ -1,46 +0,0 @@ -# Based on https://aur.archlinux.org/packages/boringssl-git/ -# Maintainer: Omar Roth -pkgname=boringssl -pkgver=1.1.0 -pkgrel=0 -pkgdesc="BoringSSL is a fork of OpenSSL that is designed to meet Google's needs" -url="https://boringssl.googlesource.com/boringssl" -arch="all" -license="MIT" -replaces="openssl libressl" -depends="!openssl-libs-static" -makedepends_host="linux-headers" -makedepends="cmake git go perl" -subpackages="$pkgname-static $pkgname-dev $pkgname-doc" -source="251b516.tar.gz::https://github.com/google/boringssl/tarball/251b516" -builddir="$srcdir/google-boringssl-251b516" - -prepare() { - : -} - -build() { - cmake -DCMAKE_BUILD_TYPE=Release . - make ssl crypto -} - -check() { - make all_tests -} - -package() { - for i in *.md ; do - install -Dm644 $i "$pkgdir/usr/share/doc/$pkgname/$i" - done - install -d "$pkgdir/usr/lib" - install -d "$pkgdir/usr/include" - cp -R include/openssl "$pkgdir/usr/include" - - install -Dm755 crypto/libcrypto.a "$pkgdir/usr/lib/libcrypto.a" - install -Dm755 ssl/libssl.a "$pkgdir/usr/lib/libssl.a" -# install -Dm755 decrepit/libdecrepit.a "$pkgdir/usr/lib/libdecrepit.a" -# install -Dm755 libboringssl_gtest.a "$pkgdir/usr/lib/libboringssl_gtest.a" -} -sha512sums=" -b1d42ed188cf0cce89d40061fa05de85b387ee4244f1236ea488a431536a2c6b657b4f03daed0ac9328c7f5c4c9330499283b8a67f1444dcf9ba5e97e1199c4e 251b516.tar.gz -" diff --git a/docker/APKBUILD-lsquic b/docker/APKBUILD-lsquic deleted file mode 100644 index 51630a0e..00000000 --- a/docker/APKBUILD-lsquic +++ /dev/null @@ -1,43 +0,0 @@ -# Maintainer: Omar Roth -pkgname=lsquic -pkgver=2.18.1 -pkgrel=0 -pkgdesc="LiteSpeed QUIC and HTTP/3 Library" -url="https://github.com/litespeedtech/lsquic" -arch="all" -license="MIT" -depends="boringssl-dev boringssl-static zlib-static libevent-static" -makedepends="cmake git go perl bsd-compat-headers linux-headers" -subpackages="$pkgname-static" -source="v$pkgver.tar.gz::https://github.com/litespeedtech/lsquic/tarball/v2.18.1 -ls-qpack-$pkgver.tar.gz::https://github.com/litespeedtech/ls-qpack/tarball/a8ae6ef -ls-hpack-$pkgver.tar.gz::https://github.com/litespeedtech/ls-hpack/tarball/bd5d589" -builddir="$srcdir/litespeedtech-$pkgname-692a910" - -prepare() { - cp -r -T "$srcdir/litespeedtech-ls-qpack-a8ae6ef" "$builddir/src/liblsquic/ls-qpack" - cp -r -T "$srcdir/litespeedtech-ls-hpack-bd5d589" "$builddir/src/lshpack" -} - -build() { - cmake \ - -DCMAKE_BUILD_TYPE=None \ - -DBORINGSSL_INCLUDE=/usr/include/openssl \ - -DBORINGSSL_LIB_crypto=/usr/lib \ - -DBORINGSSL_LIB_ssl=/usr/lib . - make lsquic -} - -check() { - make tests -} - -package() { - install -d "$pkgdir/usr/lib" - install -Dm755 src/liblsquic/liblsquic.a "$pkgdir/usr/lib/liblsquic.a" -} -sha512sums=" -d015a72f1e88750ecb364768a40f532678f11ded09c6447a2e698b20f43fa499ef143a53f4c92a5938dfece0e39e687dc9df4aea97c618faee0c63da771561c3 v2.18.1.tar.gz -c5629085a3881815fb0b72a321eeba8de093eff9417b8ac7bde1ee1264971be0dca6d61d74799b02ae03a4c629b2a9cf21387deeb814935339a8a2503ea33fee ls-qpack-2.18.1.tar.gz -1b9f7ce4c82dadfca8154229a415b0335a61761eba698f814d4b94195c708003deb5cb89318a1ab78ac8fa88b141bc9df283fb1c6e40b3ba399660feaae353a0 ls-hpack-2.18.1.tar.gz -" -- cgit v1.2.3 From 891116f13bc3afc702c85535cbf252fab6bdfc7f Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Tue, 31 Aug 2021 21:24:54 +0200 Subject: docker images with --release for more stability fixes #1652 --- docker/Dockerfile | 1 + docker/Dockerfile.arm64 | 1 + 2 files changed, 2 insertions(+) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index d3d69af6..2caa9abe 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,6 +17,7 @@ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" RUN crystal build ./src/invidious.cr \ + --release \ --static --warnings all \ --link-flags "-lxml2 -llzma" diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 84084a06..fc82c6df 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -17,6 +17,7 @@ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" RUN crystal build ./src/invidious.cr \ + --release \ --static --warnings all \ --link-flags "-lxml2 -llzma" -- cgit v1.2.3 From dd141daefdf33b6584c8b75cbd97e7ff34f81e57 Mon Sep 17 00:00:00 2001 From: syeopite <70992037+syeopite@users.noreply.github.com> Date: Wed, 1 Sep 2021 11:24:17 +0000 Subject: Make building in release mode optional (#2368) --- .github/workflows/ci.yml | 4 ++++ .github/workflows/container-release.yml | 4 +++- docker/Dockerfile | 17 +++++++++++++---- docker/Dockerfile.arm64 | 16 ++++++++++++---- 4 files changed, 32 insertions(+), 9 deletions(-) (limited to 'docker') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa6f9e33..3bb4c491 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,9 @@ jobs: - uses: actions/checkout@v2 - name: Build Docker + run: docker-compose build --build-arg release=0 + + - name: Run Docker run: docker-compose up -d - name: Test Docker @@ -112,6 +115,7 @@ jobs: context: . file: docker/Dockerfile.arm64 platforms: linux/arm64/v8 + build-args: release=0 - name: Test Docker run: while curl -Isf http://localhost:3000; do sleep 1; done diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 9cc39783..8945ef7a 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -40,6 +40,7 @@ jobs: labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest + build-args: release=1 - name: Build and push Docker ARM64 image for Push Event if: github.ref == 'refs/heads/master' @@ -50,4 +51,5 @@ jobs: platforms: linux/arm64/v8 labels: quay.expires-after=12w push: true - tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 \ No newline at end of file + tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 + build-args: release=1 \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 2caa9abe..08feb554 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,8 @@ FROM crystallang/crystal:1.1.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static +ARG release + WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock @@ -16,10 +18,17 @@ COPY ./.git/ ./.git/ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN crystal build ./src/invidious.cr \ - --release \ - --static --warnings all \ - --link-flags "-lxml2 -llzma" +RUN if [ ${release} == 1 ] ; then \ + crystal build ./src/invidious.cr \ + --release \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + else \ + crystal build ./src/invidious.cr \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + fi + FROM alpine:latest RUN apk add --no-cache librsvg ttf-opensans diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index fc82c6df..4d212d8b 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,6 +1,8 @@ FROM alpine:3.14 AS builder RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +ARG release + WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock @@ -16,10 +18,16 @@ COPY ./.git/ ./.git/ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN crystal build ./src/invidious.cr \ - --release \ - --static --warnings all \ - --link-flags "-lxml2 -llzma" +RUN if [ ${release} == 1 ] ; then \ + crystal build ./src/invidious.cr \ + --release \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + else \ + crystal build ./src/invidious.cr \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + fi FROM alpine:latest RUN apk add --no-cache librsvg ttf-opensans -- cgit v1.2.3 From 0e37e42abd6d637202a74768550c852157a04223 Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Fri, 3 Sep 2021 19:15:04 +0200 Subject: use crystal 1.1.1 for the ARM docker image --- docker/Dockerfile.arm64 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 4d212d8b..063ba6d2 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ -FROM alpine:3.14 AS builder -RUN apk add --no-cache 'crystal<2' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +FROM alpine:edge AS builder +RUN apk add --no-cache 'crystal=1.1.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release @@ -29,7 +29,7 @@ RUN if [ ${release} == 1 ] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:latest +FROM alpine:edge RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ -- cgit v1.2.3 From 6e1b62aedfa302409e0f991576660068b0015898 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 11 Sep 2021 23:06:15 -0700 Subject: Fix docker Clone scripts folder to docker container Copy videojs-dependencies.yml to docker container Copy assets folder eariler in build process Copy assets folder from builder --- docker/Dockerfile | 7 ++++++- docker/Dockerfile.arm64 | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 08feb554..87449453 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,6 +15,11 @@ COPY ./src/ ./src/ # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. COPY ./.git/ ./.git/ +# Required for fetching player dependencies +COPY ./scripts/ ./scripts/ +COPY ./assets/ ./assets/ +COPY ./videojs-dependencies.yml ./videojs-dependencies.yml + RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" @@ -35,12 +40,12 @@ RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious -COPY ./assets/ ./assets/ COPY --chown=invidious ./config/config.* ./config/ RUN mv -n config/config.example.yml config/config.yml RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml COPY ./config/sql/ ./config/sql/ COPY ./locales/ ./locales/ +COPY --from=builder /invidious/assets ./assets/ COPY --from=builder /invidious/invidious . RUN chmod o+rX -R ./assets ./config ./locales diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 063ba6d2..465c67e6 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -15,6 +15,11 @@ COPY ./src/ ./src/ # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. COPY ./.git/ ./.git/ +# Required for fetching player dependencies +COPY ./scripts/ ./scripts/ +COPY ./assets/ ./assets/ +COPY ./videojs-dependencies.yml ./videojs-dependencies.yml + RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" @@ -34,12 +39,12 @@ RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious -COPY ./assets/ ./assets/ COPY --chown=invidious ./config/config.* ./config/ RUN mv -n config/config.example.yml config/config.yml RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml COPY ./config/sql/ ./config/sql/ COPY ./locales/ ./locales/ +COPY --from=builder /invidious/assets ./assets/ COPY --from=builder /invidious/invidious . RUN chmod o+rX -R ./assets ./config ./locales -- cgit v1.2.3 From df968d1919227949bcbeedb253d66ed0720b3d2a Mon Sep 17 00:00:00 2001 From: JuniorJPDJ Date: Mon, 11 Oct 2021 21:16:56 +0200 Subject: variable postgres username and database name (#2451) --- config/migrate-scripts/migrate-db-17cf077.sh | 7 ++++-- config/migrate-scripts/migrate-db-1c8075c.sh | 11 ++++++--- config/migrate-scripts/migrate-db-1eca969.sh | 37 +++++++++++++++------------- config/migrate-scripts/migrate-db-30e6d29.sh | 7 ++++-- config/migrate-scripts/migrate-db-3646395.sh | 9 ++++--- config/migrate-scripts/migrate-db-3bcb98e.sh | 5 +++- config/migrate-scripts/migrate-db-52cb239.sh | 5 +++- config/migrate-scripts/migrate-db-6e51189.sh | 7 ++++-- config/migrate-scripts/migrate-db-701b5ea.sh | 5 +++- config/migrate-scripts/migrate-db-88b7097.sh | 5 +++- config/migrate-scripts/migrate-db-8e884fe.sh | 9 ++++--- docker/init-invidious-db.sh | 4 --- 12 files changed, 70 insertions(+), 41 deletions(-) (limited to 'docker') diff --git a/config/migrate-scripts/migrate-db-17cf077.sh b/config/migrate-scripts/migrate-db-17cf077.sh index 5e5bb214..1597311d 100755 --- a/config/migrate-scripts/migrate-db-17cf077.sh +++ b/config/migrate-scripts/migrate-db-17cf077.sh @@ -1,4 +1,7 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed bool;" -psql invidious kemal -c "UPDATE channels SET subscribed = false;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed bool;" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = false;" diff --git a/config/migrate-scripts/migrate-db-1c8075c.sh b/config/migrate-scripts/migrate-db-1c8075c.sh index 63954397..b6f7b89c 100755 --- a/config/migrate-scripts/migrate-db-1c8075c.sh +++ b/config/migrate-scripts/migrate-db-1c8075c.sh @@ -1,7 +1,10 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE" -psql invidious kemal -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool" -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN live_now CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos DROP COLUMN premiere_timestamp CASCADE" + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz" diff --git a/config/migrate-scripts/migrate-db-1eca969.sh b/config/migrate-scripts/migrate-db-1eca969.sh index f840d924..770a76d3 100755 --- a/config/migrate-scripts/migrate-db-1eca969.sh +++ b/config/migrate-scripts/migrate-db-1eca969.sh @@ -1,19 +1,22 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN title CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN views CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN likes CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN published CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN description CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN language CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN ucid CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN license CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE" -psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN title CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN views CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN likes CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN published CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN description CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN language CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN ucid CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN license CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE" diff --git a/config/migrate-scripts/migrate-db-30e6d29.sh b/config/migrate-scripts/migrate-db-30e6d29.sh index 3a377461..9d0b2d30 100755 --- a/config/migrate-scripts/migrate-db-30e6d29.sh +++ b/config/migrate-scripts/migrate-db-30e6d29.sh @@ -1,4 +1,7 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channels ADD COLUMN deleted bool;" -psql invidious kemal -c "UPDATE channels SET deleted = false;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN deleted bool;" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET deleted = false;" diff --git a/config/migrate-scripts/migrate-db-3646395.sh b/config/migrate-scripts/migrate-db-3646395.sh index 830b85f2..b6efe239 100755 --- a/config/migrate-scripts/migrate-db-3646395.sh +++ b/config/migrate-scripts/migrate-db-3646395.sh @@ -1,5 +1,8 @@ #!/bin/sh -psql invidious kemal < config/sql/session_ids.sql -psql invidious kemal -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING" -psql invidious kemal -c "ALTER TABLE users DROP COLUMN id" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/session_ids.sql +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users DROP COLUMN id" diff --git a/config/migrate-scripts/migrate-db-3bcb98e.sh b/config/migrate-scripts/migrate-db-3bcb98e.sh index cb9fa6ab..444f65ed 100755 --- a/config/migrate-scripts/migrate-db-3bcb98e.sh +++ b/config/migrate-scripts/migrate-db-3bcb98e.sh @@ -1,3 +1,6 @@ #!/bin/sh -psql invidious kemal < config/sql/annotations.sql +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/annotations.sql diff --git a/config/migrate-scripts/migrate-db-52cb239.sh b/config/migrate-scripts/migrate-db-52cb239.sh index db8efeab..da977d97 100755 --- a/config/migrate-scripts/migrate-db-52cb239.sh +++ b/config/migrate-scripts/migrate-db-52cb239.sh @@ -1,3 +1,6 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN views bigint;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN views bigint;" diff --git a/config/migrate-scripts/migrate-db-6e51189.sh b/config/migrate-scripts/migrate-db-6e51189.sh index ce728118..9132d3d7 100755 --- a/config/migrate-scripts/migrate-db-6e51189.sh +++ b/config/migrate-scripts/migrate-db-6e51189.sh @@ -1,4 +1,7 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;" -psql invidious kemal -c "UPDATE channel_videos SET live_now = false;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN live_now bool;" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channel_videos SET live_now = false;" diff --git a/config/migrate-scripts/migrate-db-701b5ea.sh b/config/migrate-scripts/migrate-db-701b5ea.sh index 429531a2..46d60c00 100755 --- a/config/migrate-scripts/migrate-db-701b5ea.sh +++ b/config/migrate-scripts/migrate-db-701b5ea.sh @@ -1,3 +1,6 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users ADD COLUMN feed_needs_update boolean" diff --git a/config/migrate-scripts/migrate-db-88b7097.sh b/config/migrate-scripts/migrate-db-88b7097.sh index 6bde8399..146ee92d 100755 --- a/config/migrate-scripts/migrate-db-88b7097.sh +++ b/config/migrate-scripts/migrate-db-88b7097.sh @@ -1,3 +1,6 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN premiere_timestamp timestamptz;" diff --git a/config/migrate-scripts/migrate-db-8e884fe.sh b/config/migrate-scripts/migrate-db-8e884fe.sh index 1c8dafd1..0d5de828 100755 --- a/config/migrate-scripts/migrate-db-8e884fe.sh +++ b/config/migrate-scripts/migrate-db-8e884fe.sh @@ -1,5 +1,8 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channels DROP COLUMN subscribed" -psql invidious kemal -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz" -psql invidious kemal -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels DROP COLUMN subscribed" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channels ADD COLUMN subscribed timestamptz" +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "UPDATE channels SET subscribed = '2019-01-01 00:00:00+00'" diff --git a/docker/init-invidious-db.sh b/docker/init-invidious-db.sh index cc0e1c3f..22b4cc5f 100755 --- a/docker/init-invidious-db.sh +++ b/docker/init-invidious-db.sh @@ -1,10 +1,6 @@ #!/bin/bash set -eou pipefail -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL - CREATE USER postgres; -EOSQL - psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channels.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/videos.sql psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < config/sql/channel_videos.sql -- cgit v1.2.3 From cc10e8ca5d1afc541dc8f4ec139d853e7ffb2835 Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Sun, 17 Oct 2021 15:14:00 +0000 Subject: bump version number for crystal alpine linux package --- docker/Dockerfile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 063ba6d2..193ed09d 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.1.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +RUN apk add --no-cache 'crystal=1.1.1-r1' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -- cgit v1.2.3 From 5eb83bb39c25d8456561ddd968533e7126d8fb07 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 24 Oct 2021 21:26:53 +0200 Subject: Bump crystal version for ARM docker container to 1.2.0-r0 (#2527) --- .github/workflows/ci.yml | 2 +- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b99ecf18..adde39c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: crystal: - 1.0.0 - 1.1.1 - - 1.2.0 + - 1.2.1 include: - crystal: nightly stable: false diff --git a/docker/Dockerfile b/docker/Dockerfile index 08feb554..21d4269c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.1.1-alpine AS builder +FROM crystallang/crystal:1.2.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 193ed09d..4fe6b1ea 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.1.1-r1' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +RUN apk add --no-cache 'crystal=1.2.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -- cgit v1.2.3 From be1a390b505487aa2a2c9f1790cb9a80b6ca7fae Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Fri, 12 Nov 2021 14:17:07 +0100 Subject: Upgrade crystal on ARM64 docker image --- docker/Dockerfile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 4fe6b1ea..4d5d46bf 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.2.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +RUN apk add --no-cache 'crystal=1.2.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -- cgit v1.2.3 From 12c219ee6ceb2a854f4ffd181938908d2a455e94 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> Date: Wed, 17 Nov 2021 20:12:58 +0000 Subject: Bump Crystal version for CI and Docker to 1.2.2 --- .github/workflows/ci.yml | 2 +- .github/workflows/container-release.yml | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adde39c9..db0987cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: crystal: - 1.0.0 - 1.1.1 - - 1.2.1 + - 1.2.2 include: - crystal: nightly stable: false diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 77b92c6f..36fb566e 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -27,7 +27,7 @@ jobs: - name: Install Crystal uses: oprypin/install-crystal@v1.2.4 with: - crystal: 1.1.1 + crystal: 1.2.2 - name: Run lint run: | diff --git a/docker/Dockerfile b/docker/Dockerfile index 21d4269c..5f1c0a11 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.2.1-alpine AS builder +FROM crystallang/crystal:1.2.2-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release -- cgit v1.2.3 From 9f9020e42203afc342ddc7fd614e5a4eaceb5870 Mon Sep 17 00:00:00 2001 From: mcnesium Date: Tue, 4 Jan 2022 17:53:40 +0100 Subject: Double quote variable to prevent sh error (#2754) --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 5f1c0a11..c73821da 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,7 +18,7 @@ COPY ./.git/ ./.git/ RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [ ${release} == 1 ] ; then \ +RUN if [ "${release}" == 1 ] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ -- cgit v1.2.3 From d928b9eaadc8298f2e92a766fdd10c79e6048858 Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Sun, 9 Jan 2022 22:27:22 +0100 Subject: switch to alpine 3.15 for using crystal 1.2.2 --- docker/Dockerfile.arm64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 4d5d46bf..d2955c7c 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM alpine:edge AS builder +FROM alpine:3.15 AS builder RUN apk add --no-cache 'crystal=1.2.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release @@ -29,7 +29,7 @@ RUN if [ ${release} == 1 ] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:edge +FROM alpine:3.15 RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ -- cgit v1.2.3 From 7dbbe27cdd935a03a266773a1a08c660db063533 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 20 Jan 2022 22:33:34 +0100 Subject: Use --production flag for shards installation on docker --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index c73821da..58f8628d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,7 @@ ARG release WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock -RUN shards install +RUN shards install --production COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index d2955c7c..0da7c603 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -6,7 +6,7 @@ ARG release WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock -RUN shards install +RUN shards install --production COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a -- cgit v1.2.3 From 7dcd5035c0592614365f8814629f90791cf359d8 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Fri, 25 Feb 2022 19:01:14 +0100 Subject: Fix the Dockerfile sed command (Closes #2938) --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index f336abcd..df35a179 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -42,7 +42,7 @@ RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious COPY --chown=invidious ./config/config.* ./config/ RUN mv -n config/config.example.yml config/config.yml -RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml +RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml COPY ./config/sql/ ./config/sql/ COPY ./locales/ ./locales/ COPY --from=builder /invidious/assets ./assets/ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 686a9278..5f4d3793 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -41,7 +41,7 @@ RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious COPY --chown=invidious ./config/config.* ./config/ RUN mv -n config/config.example.yml config/config.yml -RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml +RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: invidious-db/' config/config.yml COPY ./config/sql/ ./config/sql/ COPY ./locales/ ./locales/ COPY --from=builder /invidious/assets ./assets/ -- cgit v1.2.3 From 67e8fcaf93601f35731c7086d705f272c4526aff Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Mon, 18 Apr 2022 09:05:18 +0200 Subject: bump to crystal 1.4.0 (#3041) --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index df35a179..178c758f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.2.2-alpine AS builder +FROM crystallang/crystal:1.4.0-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 5f4d3793..abfbb9b7 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ -FROM alpine:3.15 AS builder -RUN apk add --no-cache 'crystal=1.2.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +FROM alpine:edge AS builder +RUN apk add --no-cache 'crystal=1.4.0-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release @@ -34,7 +34,7 @@ RUN if [ ${release} == 1 ] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:3.15 +FROM alpine:edge RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ -- cgit v1.2.3 From 64fe4de3fb2bbc7e33bf0321ae42b484bb0269e3 Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Fri, 29 Apr 2022 06:16:54 +0000 Subject: bump to crystal 1.4.1 --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 178c758f..1346f6eb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.4.0-alpine AS builder +FROM crystallang/crystal:1.4.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index abfbb9b7..75cab819 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.4.0-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -- cgit v1.2.3 From 6c73614a47a5a88df45aa32fadb64e85595d2a18 Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Mon, 13 Jun 2022 13:18:37 +0200 Subject: Bump revision for crystal alpine package on Docker --- docker/Dockerfile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 75cab819..a703e870 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +RUN apk add --no-cache 'crystal=1.4.1-r1' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -- cgit v1.2.3 From 5e090778aef347e20e118e54073b5b6eb5035ebd Mon Sep 17 00:00:00 2001 From: Émilien Devos Date: Tue, 19 Jul 2022 09:12:50 +0200 Subject: Use alpine 3.16 for crystal 1.4.1 Until crystal 1.5 has been tested. --- docker/Dockerfile.arm64 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index a703e870..35d3fa7b 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ -FROM alpine:edge AS builder -RUN apk add --no-cache 'crystal=1.4.1-r1' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +FROM alpine:3.16 AS builder +RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release @@ -34,7 +34,7 @@ RUN if [ ${release} == 1 ] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:edge +FROM alpine:3.16 RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ -- cgit v1.2.3 From 758b7df400742d768abf0c005e6751d12c03e479 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Tue, 1 Nov 2022 17:34:26 +0000 Subject: dockerfile: Pass '-Ddisable_quic' to 'crystal build' (#3376) + use alpine 3.16 as a base like the crystal team --- .github/workflows/container-release.yml | 34 ++++++++++++++++++++++++++++++--- docker/Dockerfile | 11 +++++++++-- docker/Dockerfile.arm64 | 9 ++++++++- 3 files changed, 48 insertions(+), 6 deletions(-) (limited to 'docker') diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 7e427e6e..86aec94f 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -52,7 +52,7 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - name: Build and push Docker AMD64 image for Push Event + - name: Build and push Docker AMD64 image without QUIC for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: @@ -62,9 +62,11 @@ jobs: labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest - build-args: release=1 + build-args: | + "release=1" + "disable_quic=1" - - name: Build and push Docker ARM64 image for Push Event + - name: Build and push Docker ARM64 image without QUIC for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: @@ -74,4 +76,30 @@ jobs: labels: quay.expires-after=12w push: true tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 + build-args: | + "release=1" + "disable_quic=1" + + - name: Build and push Docker AMD64 image with QUIC for Push Event + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile + platforms: linux/amd64 + labels: quay.expires-after=12w + push: true + tags: quay.io/invidious/invidious:${{ github.sha }}-quic,quay.io/invidious/invidious:latest-quic + build-args: release=1 + + - name: Build and push Docker ARM64 image with QUIC for Push Event + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile.arm64 + platforms: linux/arm64/v8 + labels: quay.expires-after=12w + push: true + tags: quay.io/invidious/invidious:${{ github.sha }}-arm64-quic,quay.io/invidious/invidious:latest-arm64-quic build-args: release=1 diff --git a/docker/Dockerfile b/docker/Dockerfile index 1346f6eb..34549df1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,7 @@ FROM crystallang/crystal:1.4.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release +ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml @@ -23,7 +24,13 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [ "${release}" == 1 ] ; then \ +RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ + crystal build ./src/invidious.cr \ + --release \ + -Ddisable_quic \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + elif [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ @@ -35,7 +42,7 @@ RUN if [ "${release}" == 1 ] ; then \ fi -FROM alpine:latest +FROM alpine:3.16 RUN apk add --no-cache librsvg ttf-opensans WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 35d3fa7b..ef3284b1 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -2,6 +2,7 @@ FROM alpine:3.16 AS builder RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release +ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml @@ -23,7 +24,13 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [ ${release} == 1 ] ; then \ +RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ + crystal build ./src/invidious.cr \ + --release \ + -Ddisable_quic \ + --static --warnings all \ + --link-flags "-lxml2 -llzma"; \ + elif [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ -- cgit v1.2.3 From 1f6c2342596ee864cc46cf97540af640e1ba3c78 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 1 Dec 2022 11:34:54 +0100 Subject: added tini for proper signal forwarding --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 34549df1..57864883 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,7 +43,7 @@ RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ FROM alpine:3.16 -RUN apk add --no-cache librsvg ttf-opensans +RUN apk add --no-cache librsvg ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious @@ -58,4 +58,5 @@ RUN chmod o+rX -R ./assets ./config ./locales EXPOSE 3000 USER invidious +ENTRYPOINT ["/sbin/tini", "--"] CMD [ "/invidious/invidious" ] -- cgit v1.2.3 From 215446e638fdfcb18b92ec5f1e55464c99d39693 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 15 Jan 2023 23:16:42 +0100 Subject: Docker: Also add tini to ARM64 dockerfile --- docker/Dockerfile.arm64 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index ef3284b1..10135efb 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -42,7 +42,7 @@ RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ fi FROM alpine:3.16 -RUN apk add --no-cache librsvg ttf-opensans +RUN apk add --no-cache librsvg ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious @@ -57,4 +57,5 @@ RUN chmod o+rX -R ./assets ./config ./locales EXPOSE 3000 USER invidious +ENTRYPOINT ["/sbin/tini", "--"] CMD [ "/invidious/invidious" ] -- cgit v1.2.3 From a8ba02051b261a634050ea7f621451d84ca61607 Mon Sep 17 00:00:00 2001 From: syeopite Date: Wed, 26 Jul 2023 07:25:19 -0700 Subject: Remove(?) lsquic from make and docker files --- .github/workflows/container-release.yml | 29 ++--------------------------- Makefile | 6 ------ docker/Dockerfile | 11 +---------- docker/Dockerfile.arm64 | 11 +---------- 4 files changed, 4 insertions(+), 53 deletions(-) (limited to 'docker') diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index 86aec94f..13bbf34c 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -52,7 +52,7 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - name: Build and push Docker AMD64 image without QUIC for Push Event + - name: Build and push Docker AMD64 image for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: @@ -64,9 +64,8 @@ jobs: tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest build-args: | "release=1" - "disable_quic=1" - - name: Build and push Docker ARM64 image without QUIC for Push Event + - name: Build and push Docker ARM64 image for Push Event if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: @@ -78,28 +77,4 @@ jobs: tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64 build-args: | "release=1" - "disable_quic=1" - - name: Build and push Docker AMD64 image with QUIC for Push Event - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v3 - with: - context: . - file: docker/Dockerfile - platforms: linux/amd64 - labels: quay.expires-after=12w - push: true - tags: quay.io/invidious/invidious:${{ github.sha }}-quic,quay.io/invidious/invidious:latest-quic - build-args: release=1 - - - name: Build and push Docker ARM64 image with QUIC for Push Event - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v3 - with: - context: . - file: docker/Dockerfile.arm64 - platforms: linux/arm64/v8 - labels: quay.expires-after=12w - push: true - tags: quay.io/invidious/invidious:${{ github.sha }}-arm64-quic,quay.io/invidious/invidious:latest-arm64-quic - build-args: release=1 diff --git a/Makefile b/Makefile index d4657792..9eb195df 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ RELEASE := 1 STATIC := 0 -DISABLE_QUIC := 1 NO_DBG_SYMBOLS := 0 @@ -27,10 +26,6 @@ else FLAGS += --debug endif -ifeq ($(DISABLE_QUIC), 1) - FLAGS += -Ddisable_quic -endif - ifeq ($(API_ONLY), 1) FLAGS += -Dapi_only endif @@ -115,7 +110,6 @@ help: @echo " STATIC Link libraries statically (Default: 0)" @echo "" @echo " API_ONLY Build invidious without a GUI (Default: 0)" - @echo " DISABLE_QUIC Disable support for QUIC (Default: 0)" @echo " NO_DBG_SYMBOLS Strip debug symbols (Default: 0)" diff --git a/docker/Dockerfile b/docker/Dockerfile index 57864883..761bbdca 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,15 +2,12 @@ FROM crystallang/crystal:1.4.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static ARG release -ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock RUN shards install --production -COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a - COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. @@ -24,13 +21,7 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ - crystal build ./src/invidious.cr \ - --release \ - -Ddisable_quic \ - --static --warnings all \ - --link-flags "-lxml2 -llzma"; \ - elif [[ "${release}" == 1 ]] ; then \ +RUN if [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 10135efb..cf9231fb 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -2,15 +2,12 @@ FROM alpine:3.16 AS builder RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev ARG release -ARG disable_quic WORKDIR /invidious COPY ./shard.yml ./shard.yml COPY ./shard.lock ./shard.lock RUN shards install --production -COPY --from=quay.io/invidious/lsquic-compiled /root/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a - COPY ./src/ ./src/ # TODO: .git folder is required for building – this is destructive. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. @@ -24,13 +21,7 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ --link-flags "-lxml2 -llzma" -RUN if [[ "${release}" == 1 && "${disable_quic}" == 1 ]] ; then \ - crystal build ./src/invidious.cr \ - --release \ - -Ddisable_quic \ - --static --warnings all \ - --link-flags "-lxml2 -llzma"; \ - elif [[ "${release}" == 1 ]] ; then \ +RUN if [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ --static --warnings all \ -- cgit v1.2.3 From 069e91d2a609b1df94bdfbb693335969b2a281d8 Mon Sep 17 00:00:00 2001 From: xbdm Date: Tue, 10 Oct 2023 15:12:21 -0400 Subject: alpine v3.18 & Update Helm release postgresql (#4103) Co-authored-by: Samantaz Fox Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docker/Dockerfile | 9 ++++----- docker/Dockerfile.arm64 | 6 +++--- kubernetes/Chart.lock | 6 +++--- kubernetes/Chart.yaml | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 761bbdca..c9644ca6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM crystallang/crystal:1.4.1-alpine AS builder +FROM crystallang/crystal:1.8.2-alpine AS builder + RUN apk add --no-cache sqlite-static yaml-static ARG release @@ -19,8 +20,7 @@ COPY ./assets/ ./assets/ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml RUN crystal spec --warnings all \ - --link-flags "-lxml2 -llzma" - + --link-flags "-lxml2 -llzma" RUN if [[ "${release}" == 1 ]] ; then \ crystal build ./src/invidious.cr \ --release \ @@ -32,8 +32,7 @@ RUN if [[ "${release}" == 1 ]] ; then \ --link-flags "-lxml2 -llzma"; \ fi - -FROM alpine:3.16 +FROM alpine:3.18 RUN apk add --no-cache librsvg ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index cf9231fb..d9a4eeaf 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ -FROM alpine:3.16 AS builder -RUN apk add --no-cache 'crystal=1.4.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-dev zlib-static openssl-libs-static openssl-dev musl-dev +FROM alpine:3.18 AS builder +RUN apk add --no-cache 'crystal=1.8.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-static zlib-static openssl-libs-static openssl-dev musl-dev xz-static ARG release @@ -32,7 +32,7 @@ RUN if [[ "${release}" == 1 ]] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:3.16 +FROM alpine:3.18 RUN apk add --no-cache librsvg ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ diff --git a/kubernetes/Chart.lock b/kubernetes/Chart.lock index cc76e920..ef12b0b6 100644 --- a/kubernetes/Chart.lock +++ b/kubernetes/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami/ - version: 12.1.9 -digest: sha256:71ff342a6c0a98bece3d7fe199983afb2113f8db65a3e3819de875af2c45add7 -generated: "2023-01-20T20:42:32.757707004Z" + version: 12.11.1 +digest: sha256:3c10008175c4f5c1cec38782f5a7316154b89074c77ebbd9bcc4be4f5ff21122 +generated: "2023-09-14T22:40:43.171275362Z" diff --git a/kubernetes/Chart.yaml b/kubernetes/Chart.yaml index 4e4295ba..d22f6254 100644 --- a/kubernetes/Chart.yaml +++ b/kubernetes/Chart.yaml @@ -17,6 +17,6 @@ maintainers: email: mail@leonklingele.de dependencies: - name: postgresql - version: ~12.1.6 + version: ~12.11.0 repository: "https://charts.bitnami.com/bitnami/" engine: gotpl -- cgit v1.2.3 From 9ce9c543992243737516750bf08f5d073e899715 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Tue, 21 Nov 2023 20:47:07 +0100 Subject: Install rsvg-convert on docker images (#4230) (#4282) In #4103 alpine was updated from 3.16 to 3.18, but in 3.17 librsvg packages was splitted and rsvg-convert is on his own package. --- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index c9644ca6..ace096bf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -33,7 +33,7 @@ RUN if [[ "${release}" == 1 ]] ; then \ fi FROM alpine:3.18 -RUN apk add --no-cache librsvg ttf-opensans tini +RUN apk add --no-cache rsvg-convert ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index d9a4eeaf..602f3ab2 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -33,7 +33,7 @@ RUN if [[ "${release}" == 1 ]] ; then \ fi FROM alpine:3.18 -RUN apk add --no-cache librsvg ttf-opensans tini +RUN apk add --no-cache rsvg-convert ttf-opensans tini WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious -- cgit v1.2.3 From 2fdb6dd6441287e51abe06f4d9e6ce0586f916ff Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sat, 27 Apr 2024 21:02:37 +0200 Subject: CI: Bump Crystal version in docker too --- .github/workflows/container-release.yml | 2 +- docker/Dockerfile | 2 +- docker/Dockerfile.arm64 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/.github/workflows/container-release.yml b/.github/workflows/container-release.yml index e44ac200..795995e9 100644 --- a/.github/workflows/container-release.yml +++ b/.github/workflows/container-release.yml @@ -26,7 +26,7 @@ jobs: - name: Install Crystal uses: crystal-lang/install-crystal@v1.8.0 with: - crystal: 1.9.2 + crystal: 1.12.1 - name: Run lint run: | diff --git a/docker/Dockerfile b/docker/Dockerfile index ace096bf..3d9323fd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.8.2-alpine AS builder +FROM crystallang/crystal:1.12.1-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 602f3ab2..f054b326 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,5 @@ -FROM alpine:3.18 AS builder -RUN apk add --no-cache 'crystal=1.8.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-static zlib-static openssl-libs-static openssl-dev musl-dev xz-static +FROM alpine:3.19 AS builder +RUN apk add --no-cache 'crystal=1.10.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-static zlib-static openssl-libs-static openssl-dev musl-dev xz-static ARG release -- cgit v1.2.3 From 1a49e798c804e7841574838409dd0500010cbb16 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sat, 9 Nov 2024 21:52:06 +0100 Subject: Docker: Install tzdata in Dockerfile --- docker/Dockerfile | 6 +++--- docker/Dockerfile.arm64 | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 3d9323fd..900c9e74 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.12.1-alpine AS builder +FROM crystallang/crystal:1.12.2-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static @@ -32,8 +32,8 @@ RUN if [[ "${release}" == 1 ]] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:3.18 -RUN apk add --no-cache rsvg-convert ttf-opensans tini +FROM alpine:3.20 +RUN apk add --no-cache rsvg-convert ttf-opensans tini tzdata WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index f054b326..ce9bab08 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -1,5 +1,6 @@ -FROM alpine:3.19 AS builder -RUN apk add --no-cache 'crystal=1.10.1-r0' shards sqlite-static yaml-static yaml-dev libxml2-static zlib-static openssl-libs-static openssl-dev musl-dev xz-static +FROM alpine:3.20 AS builder +RUN apk add --no-cache 'crystal=1.12.2-r0' shards sqlite-static yaml-static yaml-dev libxml2-static \ + zlib-static openssl-libs-static openssl-dev musl-dev xz-static ARG release @@ -32,8 +33,8 @@ RUN if [[ "${release}" == 1 ]] ; then \ --link-flags "-lxml2 -llzma"; \ fi -FROM alpine:3.18 -RUN apk add --no-cache rsvg-convert ttf-opensans tini +FROM alpine:3.20 +RUN apk add --no-cache rsvg-convert ttf-opensans tini tzdata WORKDIR /invidious RUN addgroup -g 1000 -S invidious && \ adduser -u 1000 -S invidious -G invidious -- cgit v1.2.3