Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkataChalla554 committed May 31, 2024
1 parent b69cd68 commit 4acc894
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

# Set timezone
RUN apk add --update --no-cache tzdata && \
cp /usr/share/zoneinfo/Europe/London /etc/localtime && \
echo "Europe/London" > /etc/timezone

# Install build dependencies
RUN apk add --update --no-cache --virtual .build-deps \
postgresql-dev build-base \
&& apk add --update --no-cache libpq yarn yaml-dev
postgresql-dev build-base

# Install runtime dependencies
RUN apk add --update --no-cache libpq yarn yaml-dev

# Copy Gemfile and Gemfile.lock before bundle install
COPY .tool-versions Gemfile Gemfile.lock ./

# Install gems
RUN bundle install --without=test development --jobs=4
# Install gems with verbose logging
RUN bundle install --without=test development --jobs=4 --verbose

# Clean up bundler cache
RUN rm -rf /usr/local/bundle/cache
Expand All @@ -27,11 +30,13 @@ RUN apk del .build-deps

# Copy package.json and yarn.lock and install yarn packages
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile && \
RUN yarn install --frozen-lockfile && \
yarn cache clean

# Copy application code
COPY . .

# Set environment variables
RUN echo export PATH=/usr/local/bin:\$PATH > /root/.ashrc
ENV ENV="/root/.ashrc"

Expand Down

0 comments on commit 4acc894

Please sign in to comment.