diff --git a/commit-watcher/Dockerfile b/commit-watcher/Dockerfile new file mode 100644 index 0000000..26da8b7 --- /dev/null +++ b/commit-watcher/Dockerfile @@ -0,0 +1,29 @@ +FROM mhart/alpine-node:5 + +RUN apk add --no-cache \ + ca-certificates \ + libxml2 \ + libxslt \ + ruby + +RUN set -x \ + && apk add --no-cache --virtual .build-deps \ + build-base \ + cmake \ + git \ + libxml2-dev \ + libxslt-dev \ + mariadb-dev \ + ruby-dev \ + && git clone --depth 1 https://github.com/srcclr/commit-watcher.git /usr/src/commit-watcher \ + && cd /usr/src/commit-watcher \ + && gem install bundler io-console --no-rdoc --no-ri \ + && bundle config build.nokogiri --use-system-libraries \ + && bundle install \ + && apk del .build-deps + +WORKDIR /usr/src/commit-watcher + +COPY database.yml /usr/src/commit-watcher/config/database.yml + +CMD ["./scripts/deploy"] diff --git a/commit-watcher/database.yml b/commit-watcher/database.yml new file mode 100644 index 0000000..bf07914 --- /dev/null +++ b/commit-watcher/database.yml @@ -0,0 +1,28 @@ +default: &default + adapter: mysql2 + encoding: utf8 + pool: 5 + username: root + password: + # Use this for local mysql instances + # socket: /tmp/mysql.sock + + # Use this for Docker + host: localhost:3306 + +development: + <<: *default + database: commit_watcher_development + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: commit_watcher_test + +production: + <<: *default + username: commit_watcher + password: <%= ENV['COMMIT_WATCHER_DATABASE_PASSWORD'] %> + database: commit_watcher_production