Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #918

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ ARG RUBY_VERSION=3.3.5
ARG NODE_VERSION=22.7.0

# Use Node image so we can pull the binaries from here.
FROM node:$NODE_VERSION as node
FROM node:$NODE_VERSION AS node

# Ruby build image.
FROM ruby:${RUBY_VERSION}-slim as base
FROM ruby:${RUBY_VERSION}-slim AS base

# Setup environment variables.
ENV WORK_ROOT /src
ENV APP_HOME $WORK_ROOT/app
ENV LANG C.UTF-8
ENV BUNDLE_PATH $APP_HOME/vendor/bundle
ENV WORK_ROOT=/src
ENV APP_HOME=$WORK_ROOT/app
ENV LANG=C.UTF-8
ENV BUNDLE_PATH=$APP_HOME/vendor/bundle

# Set prod environment to avoid installing dev dependencies
ENV BUNDLE_WITHOUT development:test
ENV BUNDLE_DEPLOYMENT 1
ENV RAILS_ENV production
ENV NODE_ENV production
ENV BUNDLE_WITHOUT=development:test
ENV BUNDLE_DEPLOYMENT=1
ENV RAILS_ENV=production
ENV NODE_ENV=production

# Throw-away build stage to reduce size of final image
FROM base as builder
FROM base AS builder

RUN apt-get update -qq && \
apt-get install -y build-essential libssl-dev libpq-dev git libsasl2-dev curl && \
Expand Down Expand Up @@ -76,8 +76,8 @@ COPY --from=builder $APP_HOME/vendor/ $APP_HOME/vendor/
RUN ln -s /usr/lib/*-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so.2

# Deployment options
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT=true
ENV RAILS_SERVE_STATIC_FILES=true
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2

# Entrypoint prepares the database.
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG RUBY_VERSION=3.3.5
ARG NODE_VERSION=22.7.0

# Use Node image so we can pull the binaries from here.
FROM node:$NODE_VERSION as node
FROM node:$NODE_VERSION AS node

# Ruby build image.
FROM ruby:${RUBY_VERSION}-slim
Expand All @@ -16,9 +16,9 @@ COPY --from=node /usr/local /usr/local
COPY --from=node /opt /opt

# Setup environment variables.
ENV WORK_ROOT /src
ENV APP_HOME $WORK_ROOT/app/
ENV LANG C.UTF-8
ENV WORK_ROOT=/src
ENV APP_HOME=$WORK_ROOT/app/
ENV LANG=C.UTF-8

# Create app directory.
RUN mkdir -p $APP_HOME
Expand Down
Loading