-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
99 additions
and
7 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,13 @@ | ||
.bundle | ||
.env | ||
.envrc | ||
.idea | ||
.git | ||
coverage | ||
log | ||
spec | ||
tmp | ||
vendor | ||
**/node_modules | ||
**/bower_components | ||
deployment |
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,34 @@ | ||
# To build run: docker build -t avro-schema-registry . | ||
|
||
FROM ruby:2.4.2 | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Copy the Gemfile as well as the Gemfile.lock and install | ||
# the RubyGems. This is a separate step so the dependencies | ||
# will be cached unless changes to one of those two files | ||
# are made. | ||
COPY Gemfile Gemfile.lock ./ | ||
RUN gem install bundler --no-document && bundle install --jobs 20 --retry 5 | ||
|
||
COPY . /app | ||
|
||
# Run the app as a non-root user. The source code will be read-only, | ||
# but the process will complain if it can't write to tmp or log (even | ||
# though we're writing the logs to STDOUT). | ||
RUN mkdir /app/tmp /app/log | ||
RUN groupadd --system avro && \ | ||
useradd --no-log-init --system --create-home --gid avro avro && \ | ||
chown -R avro:avro /app/tmp /app/log | ||
USER avro | ||
|
||
ENV RACK_ENV=production | ||
ENV RAILS_ENV=production | ||
ENV RAILS_LOG_TO_STDOUT=true | ||
ENV PORT=5000 | ||
|
||
EXPOSE 5000 | ||
|
||
# Start puma | ||
CMD 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