-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (39 loc) · 2.15 KB
/
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
# ==============================================================================
# Use the official Ruby image from Docker Hub
# ------------------------------------------------------------------------------
FROM ruby:3.2.2
# ==============================================================================
# Set environment variables
# ------------------------------------------------------------------------------
ENV RAILS_ROOT /share/Public/Web-Hosting/wildflower_designs
# ==============================================================================
# Create and set the working directory
# ------------------------------------------------------------------------------
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT
# ==============================================================================
# Install system dependencies
# ------------------------------------------------------------------------------
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client imagemagick
# ==============================================================================
# Copy Gemfile and install gems
# ------------------------------------------------------------------------------
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install --without development test
# ==============================================================================
# Copy the main application
# ------------------------------------------------------------------------------
COPY . .
# ==============================================================================
# Precompile assets
# ------------------------------------------------------------------------------
RUN bundle exec rails assets:precompile
# ==============================================================================
# Expose port 8538 to the Docker host
# ------------------------------------------------------------------------------
EXPOSE 8538
# ==============================================================================
# The default command that gets run will start the Puma server
# ------------------------------------------------------------------------------
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]