Skip to content

Commit fd4f3ee

Browse files
committed
Fix dockerfile
1 parent f31ddb5 commit fd4f3ee

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ FROM ruby:2.7.4
22

33
RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
44
RUN apt-get update && apt-get install -y --no-install-recommends \
5-
build-essential libpq-dev libmariadb-dev sqlite3 libsqlite3-dev nodejs
5+
python build-essential libpq-dev libmariadb-dev sqlite3 libsqlite3-dev nodejs
6+
RUN npm install -g yarn
7+
8+
ENV RAILS_ENV production
9+
ENV RAILS_SERVE_STATIC_FILES true
10+
ENV RAILS_LOG_TO_STDOUT true
611

712
WORKDIR /usr/src/app
813
COPY Gemfile* ./
9-
RUN bundle install
14+
RUN bundle install --without development test
15+
1016
COPY . .
17+
# RUN npm rebuild node-sass
18+
RUN SECRET_KEY_BASE="assets_compile" bundle exec rails assets:precompile
1119

1220
EXPOSE 3000
1321
CMD ["rails", "server", "-b", "0.0.0.0"]

config/environments/production.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Rails.application.configure do
22
# Settings specified here will take precedence over those in config/application.rb.
3+
config.hosts << "aylamusica.jamezrin.name"
34

45
# Code is not reloaded between requests.
56
config.cache_classes = true

0 commit comments

Comments
 (0)