mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-19 15:15:58 -04:00
Modify Dockerfile to allow building in Globe
This commit is contained in:
parent
a9b8f0f647
commit
e3980f2da5
@ -5,19 +5,20 @@ RUN apk add --no-cache sqlite-static yaml-static
|
||||
ARG release
|
||||
|
||||
WORKDIR /invidious
|
||||
COPY ./shard.yml ./shard.yml
|
||||
COPY ./shard.lock ./shard.lock
|
||||
COPY ./services/invidious/shard.yml ./shard.yml
|
||||
COPY ./services/invidious/shard.lock ./shard.lock
|
||||
RUN shards install --production
|
||||
|
||||
COPY ./src/ ./src/
|
||||
COPY ./services/invidious/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/
|
||||
COPY ./services/invidious/.git/ ./.git/
|
||||
RUN sed -i '/worktree/d' .git/config
|
||||
|
||||
# Required for fetching player dependencies
|
||||
COPY ./scripts/ ./scripts/
|
||||
COPY ./assets/ ./assets/
|
||||
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
||||
COPY ./services/invidious/scripts/ ./scripts/
|
||||
COPY ./services/invidious/assets/ ./assets/
|
||||
COPY ./services/invidious/videojs-dependencies.yml ./videojs-dependencies.yml
|
||||
|
||||
RUN crystal spec --warnings all \
|
||||
--link-flags "-lxml2 -llzma"
|
||||
@ -37,11 +38,11 @@ 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
|
||||
COPY --chown=invidious ./config/config.* ./config/
|
||||
COPY --chown=invidious ./services/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: invidious-db/' config/config.yml
|
||||
COPY ./config/sql/ ./config/sql/
|
||||
COPY ./locales/ ./locales/
|
||||
COPY ./services/invidious/config/sql/ ./config/sql/
|
||||
COPY ./services/invidious/locales/ ./locales/
|
||||
COPY --from=builder /invidious/assets ./assets/
|
||||
COPY --from=builder /invidious/invidious .
|
||||
RUN chmod o+rX -R ./assets ./config ./locales
|
||||
|
@ -4,19 +4,20 @@ RUN apk add --no-cache 'crystal=1.10.1-r0' shards sqlite-static yaml-static yaml
|
||||
ARG release
|
||||
|
||||
WORKDIR /invidious
|
||||
COPY ./shard.yml ./shard.yml
|
||||
COPY ./shard.lock ./shard.lock
|
||||
COPY ./services/invidious/shard.yml ./shard.yml
|
||||
COPY ./services/invidious/shard.lock ./shard.lock
|
||||
RUN shards install --production
|
||||
|
||||
COPY ./src/ ./src/
|
||||
COPY ./services/invidious/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/
|
||||
COPY ./services/invidious/.git/ ./.git/
|
||||
RUN sed -i '/worktree/d' .git/config
|
||||
|
||||
# Required for fetching player dependencies
|
||||
COPY ./scripts/ ./scripts/
|
||||
COPY ./assets/ ./assets/
|
||||
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
||||
COPY ./services/invidious/scripts/ ./scripts/
|
||||
COPY ./services/invidious/assets/ ./assets/
|
||||
COPY ./services/invidious/videojs-dependencies.yml ./videojs-dependencies.yml
|
||||
|
||||
RUN crystal spec --warnings all \
|
||||
--link-flags "-lxml2 -llzma"
|
||||
@ -37,11 +38,11 @@ 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
|
||||
COPY --chown=invidious ./config/config.* ./config/
|
||||
COPY --chown=invidious ./services/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: invidious-db/' config/config.yml
|
||||
COPY ./config/sql/ ./config/sql/
|
||||
COPY ./locales/ ./locales/
|
||||
COPY ./services/invidious/config/sql/ ./config/sql/
|
||||
COPY ./services/invidious/locales/ ./locales/
|
||||
COPY --from=builder /invidious/assets ./assets/
|
||||
COPY --from=builder /invidious/invidious .
|
||||
RUN chmod o+rX -R ./assets ./config ./locales
|
||||
|
Loading…
x
Reference in New Issue
Block a user