-
-
Notifications
You must be signed in to change notification settings - Fork 101
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 #437 from Freika/feature/production_env
Add production environment configuration
- Loading branch information
Showing
22 changed files
with
396 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.21.6 | ||
0.22.0 |
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,4 +8,3 @@ def index | |
render json: { status: 'ok' } | ||
end | ||
end | ||
|
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ruby:3.3.4-alpine | ||
|
||
ENV APP_PATH=/var/app | ||
ENV BUNDLE_VERSION=2.5.21 | ||
ENV BUNDLE_PATH=/usr/local/bundle/gems | ||
ENV RAILS_LOG_TO_STDOUT=true | ||
ENV RAILS_PORT=3000 | ||
ENV RAILS_ENV=production | ||
|
||
# Install dependencies for application | ||
RUN apk -U add --no-cache \ | ||
build-base \ | ||
git \ | ||
postgresql-dev \ | ||
postgresql-client \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
nodejs \ | ||
yarn \ | ||
imagemagick \ | ||
tzdata \ | ||
less \ | ||
yaml-dev \ | ||
gcompat \ | ||
&& mkdir -p $APP_PATH | ||
|
||
# Update gem system and install bundler | ||
RUN gem update --system 3.6.2 \ | ||
&& gem install bundler --version "$BUNDLE_VERSION" \ | ||
&& rm -rf $GEM_HOME/cache/* | ||
|
||
WORKDIR $APP_PATH | ||
|
||
COPY ../Gemfile ../Gemfile.lock ../vendor ../.ruby-version ./ | ||
|
||
# Install production gems only | ||
RUN bundle config set --local path 'vendor/bundle' \ | ||
&& bundle install --jobs 4 --retry 3 --without development test | ||
|
||
COPY ../. ./ | ||
|
||
# Precompile assets for production | ||
RUN bundle exec rake assets:precompile \ | ||
&& rm -rf node_modules tmp/cache | ||
|
||
# Copy entrypoint scripts and grant execution permissions | ||
COPY ./docker/web-entrypoint.sh /usr/local/bin/web-entrypoint.sh | ||
RUN chmod +x /usr/local/bin/web-entrypoint.sh | ||
|
||
COPY ./docker/sidekiq-entrypoint.sh /usr/local/bin/sidekiq-entrypoint.sh | ||
RUN chmod +x /usr/local/bin/sidekiq-entrypoint.sh | ||
|
||
EXPOSE $RAILS_PORT | ||
|
||
ENTRYPOINT [ "bundle", "exec" ] |
Oops, something went wrong.