forked from getlago/lago-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 994 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM ruby:3.4.5-slim AS build
WORKDIR /app
RUN apt update && apt upgrade -y
RUN apt install nodejs curl build-essential git pkg-config libpq-dev libclang-dev postgresql-client curl libyaml-dev -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y
COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock
ENV BUNDLER_VERSION='2.6.8'
ENV PATH="$PATH:/root/.cargo/bin/"
RUN gem install bundler --no-document -v '2.6.8'
RUN bundle config build.nokogiri --use-system-libraries &&\
bundle install --jobs=3 --retry=3 --without development test
FROM ruby:3.4.5-slim
RUN apt update && apt upgrade -y
RUN apt install git libpq-dev curl postgresql-client -y
ARG SEGMENT_WRITE_KEY
ARG GOCARDLESS_CLIENT_ID
ARG GOCARDLESS_CLIENT_SECRET
ENV SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
ENV GOCARDLESS_CLIENT_ID=$GOCARDLESS_CLIENT_ID
ENV GOCARDLESS_CLIENT_SECRET=$GOCARDLESS_CLIENT_SECRET
COPY --from=build /usr/local/bundle/ /usr/local/bundle
WORKDIR /app
COPY . .
CMD ["./scripts/start.sh"]