Skip to content

Commit b4879f8

Browse files
author
Maksim Litvinov
committed
add dockerfile
1 parent 7643ae0 commit b4879f8

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ruby:3.2.2
2+
3+
RUN apt-get update \
4+
&& apt-get install -y build-essential libpq-dev libsqlite3-dev curl
5+
6+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
7+
RUN apt-get install -y nodejs
8+
RUN npm install --global yarn
9+
10+
ENV DISABLE_SPRING=1
11+
ENV RAILS_SERVE_STATIC_FILES=enabled
12+
ENV RAILS_LOG_TO_STDOUT=enabled
13+
14+
WORKDIR /app
15+
16+
COPY Gemfile .
17+
COPY Gemfile.lock .
18+
RUN bundle install
19+
20+
COPY package.json .
21+
COPY yarn.lock .
22+
RUN yarn install
23+
24+
COPY . .
25+
26+
RUN bin/rails assets:precompile
27+
28+
CMD ["bash", "-c", "bin/rails db:prepare && bin/rails server"]

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

6-
ruby '3.2.1'
6+
ruby '~> 3.2.2'
77

88
gem 'bootsnap', require: false
99
gem 'cssbundling-rails'

config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ test:
2222

2323
production:
2424
<<: *default
25-
url: <%= ENV['DATABASE_URL'] %>
25+
url: db/production.sqlite3

0 commit comments

Comments
 (0)