This repository has been archived by the owner on Mar 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert to puma, add circle, Dockerfile (#49)
* convert to puma, add circle, Dockerfile * Connect db with method not dependant on db_connections gem * Copy paste fail * Fix teaspoon * Remove db connection lines because there's no db * Revert "Remove db connection lines because there's no db" This reverts commit 9c588b8. * Fix circle build * Add redis to circle build for teaspoon * remove brakeman from circle build
- Loading branch information
1 parent
257f4de
commit 8e02644
Showing
7 changed files
with
78 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ruby:2.3.1-alpine | ||
|
||
RUN apk add --update build-base nodejs tzdata postgresql-dev linux-headers git | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
VOLUME /app/log | ||
|
||
EXPOSE 3000 | ||
|
||
RUN gem install bundler && \ | ||
bundle install --without development:test --system | ||
|
||
CMD ["sh", "-c", "exec bundle exec puma -C config/puma.rb"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb | ||
web: bundle exec puma -C config/puma.rb | ||
monitor_queue_sizes: bin/monitor_queue_sizes |
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,41 @@ | ||
general: | ||
branches: | ||
ignore: | ||
- /deploy\/.*/ | ||
- staging | ||
- production | ||
|
||
dependencies: | ||
pre: | ||
- gem install bundler | ||
override: | ||
- bundle install --path=vendor/bundle: | ||
timeout: 180 | ||
machine: | ||
timezone: | ||
America/Los_Angeles | ||
services: | ||
- docker | ||
- redis | ||
|
||
deployment: | ||
production: | ||
branch: master | ||
commands: | ||
- bundle exec rake assets:precompile | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- docker build -t stitchfix/resque-brain:$CIRCLE_SHA1 . | ||
- docker tag stitchfix/resque-brain:$CIRCLE_SHA1 stitchfix/resque-brain:latest | ||
- docker push stitchfix/resque-brain:latest | ||
- docker push stitchfix/resque-brain:$CIRCLE_SHA1 | ||
other: | ||
branch: /^((?!master).)*$/ | ||
commands: | ||
- bundle exec rake assets:precompile | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- docker build -t stitchfix/resque-brain:$CIRCLE_SHA1 . | ||
- docker tag stitchfix/resque-brain:$CIRCLE_SHA1 stitchfix/goro:latest | ||
|
||
notify: | ||
webhooks: | ||
- url: https://fixops-service.stitchfix.com/webhooks/circleci |
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,17 @@ | ||
workers Integer(ENV['WEB_CONCURRENCY'] || 4) | ||
threads_count = Integer(ENV['MAX_THREADS'] || 1) | ||
threads threads_count, threads_count | ||
|
||
preload_app! | ||
|
||
rackup DefaultRackup | ||
port ENV['PORT'] || 3000 | ||
environment ENV['RACK_ENV'] || 'development' | ||
|
||
on_worker_boot do | ||
# Worker specific setup for Rails 4.1+ | ||
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot | ||
if defined?(ActiveRecord::Base) | ||
ActiveRecord::Base.establish_connection | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.