Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jan 24, 2023
1 parent 990e843 commit 7f2916c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
25 changes: 24 additions & 1 deletion backup-stats-collector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
FROM openfaas/of-watchdog:0.8.2 as watchdog
FROM ruby:3.2.0-slim as base

WORKDIR /mnt

RUN adduser --system app &&\
bundle config --local path vendor/bundle &&\
bundle config set --local deployment 'true' &&\
bundle config set --local without 'development test'

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

EXPOSE 8080
HEALTHCHECK --interval=2s CMD curl -f http://127.0.0.1:4567/healthcheck

ENV fprocess="bundle exec falcon serve -b http://0.0.0.0 -p 4567 -n 1"
ENV upstream_url="http://127.0.0.1:4567"
ENV mode="http"
ENV APP_ENV="production"

CMD ["fwatchdog"]

FROM ghcr.io/zhulik/fn-builder as builder

RUN apt-get update &&\
Expand All @@ -9,7 +32,7 @@ RUN wget -O- https://github.com/restic/restic/releases/download/v0.15.0/restic_0
COPY function/Gemfile function/Gemfile.lock ./
RUN bundle install

FROM ghcr.io/zhulik/fn-base
FROM base

COPY --from=builder /mnt/ .
COPY --from=builder /usr/bin/restic /usr/bin
Expand Down
5 changes: 5 additions & 0 deletions base/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ FROM ruby:3.2.0-slim

WORKDIR /mnt

RUN adduser --system app &&\
bundle config --local path vendor/bundle &&\
bundle config set --local deployment 'true' &&\
bundle config set --local without 'development test'

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

Expand Down
2 changes: 2 additions & 0 deletions base/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ gem "falcon"
gem "sentry-ruby"
gem "sinatra"
gem "zeitwerk"
gem "ox"
gem "aws-sdk-s3"

0 comments on commit 7f2916c

Please sign in to comment.