-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from hexlet-components/deploy
Deploy
- Loading branch information
Showing
5 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ruby-3.2.1 | ||
ruby-3.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ruby:3.2.2 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y build-essential libpq-dev libsqlite3-dev curl | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - | ||
RUN apt-get install -y nodejs | ||
RUN npm install --global yarn | ||
|
||
ENV DISABLE_SPRING=1 | ||
ENV RAILS_SERVE_STATIC_FILES=enabled | ||
ENV RAILS_LOG_TO_STDOUT=enabled | ||
|
||
WORKDIR /app | ||
|
||
COPY Gemfile . | ||
COPY Gemfile.lock . | ||
RUN bundle install | ||
|
||
COPY package.json . | ||
COPY yarn.lock . | ||
RUN yarn install | ||
|
||
COPY . . | ||
|
||
RUN bin/rails assets:precompile | ||
|
||
CMD ["bash", "-c", "bin/rails db:prepare && bin/rails server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ test: | |
|
||
production: | ||
<<: *default | ||
url: <%= ENV['DATABASE_URL'] %> | ||
url: db/production.sqlite3 |