-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 893 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
# Use the official Ruby image as the base image
FROM ruby:3.1.2
# Set environment variables for Rails
ENV APP_HOME /app
# Create and set the working directory
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
# Install essential dependencies
RUN apt-get update -qq && apt-get install -y postgresql-client
# Install bundler
RUN gem install bundler
# Copy the Gemfile and Gemfile.lock into the image and install gems
COPY Gemfile Gemfile.lock ./
RUN bundle install --jobs 20 --retry 5
# Copy over our application code
ADD . $APP_HOME
# Set our environment variables
# ENV RAILS_ENV production
# ENV RAILS_LOG_TO_STDOUT true
#ensures our rails logs will be exposed from the container (useful for debugging!)
EXPOSE 3000
# Start the puma server
CMD bundle exec puma -p 3000
# # Configure endpoint.
# COPY /entrypoint.sh /usr/bin/
# RUN chmod +x /usr/bin/entrypoint.sh
# ENTRYPOINT ["entrypoint.sh"]