forked from codeforamerica/foundational-project-2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 797 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
FROM ruby:3.0.4
# System prerequisites
RUN apt-get update \
&& apt-get -y install build-essential libpq-dev nodejs \
&& rm -rf /var/lib/apt/lists/*
# If you require additional OS dependencies, install them here:
# RUN apt-get update \
# && apt-get -y install imagemagick nodejs \
# && rm -rf /var/lib/apt/lists/*
ADD Gemfile /app/
ADD Gemfile.lock /app/
WORKDIR /app
RUN bundle install
ADD . /app
# Collect assets. This approach is not fully production-ready, but
# will help you experiment with Aptible before bothering with assets.
# Review http://go.aptible.com/assets for production-ready advice.
RUN set -a \
&& . ./.aptible.env \
&& bundle exec rake assets:precompile
EXPOSE 3000
RUN rails assets:precompile
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0", "-p", "3000"]