forked from getlago/lago-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (35 loc) · 911 Bytes
/
Dockerfile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ruby:3.2.2-alpine as build
WORKDIR /app
COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock
RUN apk add --no-cache \
git \
bash \
build-base \
libxml2-dev \
libxslt-dev \
nodejs \
tzdata \
openssl \
postgresql-dev \
libc6-compat
ENV BUNDLER_VERSION='2.3.26'
RUN gem install bundler --no-document -v '2.3.26'
RUN bundle config build.nokogiri --use-system-libraries &&\
bundle install --jobs=3 --retry=3 --without development test
FROM ruby:3.2.2-alpine
WORKDIR /app
COPY . /app
RUN apk add --no-cache \
bash \
postgresql-dev \
tzdata \
libc6-compat
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
CMD ["./scripts/start.sh"]