forked from wearefriday/spectre
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerize properly, and update README
- Loading branch information
Alkesh Vaghmaria
committed
Feb 7, 2017
1 parent
8ee42c8
commit 5c5709c
Showing
5 changed files
with
75 additions
and
35 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
# Ignore bundler config. | ||
/.bundle | ||
|
||
public/assets/ | ||
public/system/ | ||
|
||
# Ignore the default SQLite database. | ||
|
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,7 +1,12 @@ | ||
FROM ruby:2.3 | ||
RUN mkdir /app | ||
|
||
WORKDIR /app | ||
ADD Gemfile Gemfile | ||
ADD Gemfile.lock Gemfile.lock | ||
RUN bundle install | ||
ADD . /app | ||
|
||
ADD Gemfile* /app/ | ||
|
||
RUN gem install bundler && bundle config build.nokogiri --use-system-libraries && bundle install --jobs 16 --retry 5 --without development test | ||
|
||
ADD . /app | ||
|
||
EXPOSE 3000 | ||
CMD ["rails", "server", "-b", "0.0.0.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
development: | ||
default: &default | ||
adapter: postgresql | ||
encoding: utf8 | ||
database: spectre_development | ||
pool: 5 | ||
username: | ||
password: | ||
|
||
production: | ||
adapter: postgresql | ||
encoding: utf8 | ||
database: wafi-spectre | ||
pool: 5 | ||
username: deploy | ||
port: 5432 | ||
timeout: 5000 | ||
|
||
development: | ||
<<: *default | ||
database: spectre_development | ||
|
||
test: &test | ||
adapter: postgresql | ||
encoding: utf8 | ||
<<: *default | ||
database: spectre_test | ||
pool: 5 | ||
username: | ||
password: | ||
|
||
cucumber: | ||
<<: *test | ||
|
||
production: | ||
<<: *default | ||
url: <%= ENV['DATABASE_URL'] %> |
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,17 +1,30 @@ | ||
version: "2" | ||
|
||
services: | ||
web: | ||
app: | ||
build: . | ||
volumes: | ||
- .:/app | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- '.env.example' | ||
command: bundle exec rails s -b '0.0.0.0' | ||
depends_on: | ||
- db | ||
- "3000:3000" | ||
links: | ||
- db | ||
environment: | ||
- RACK_ENV=production | ||
- RAILS_SERVE_STATIC_FILES=true | ||
- DATABASE_URL=postgresql://postgres@db/spectre | ||
volumes: | ||
- .:/app | ||
command: bash -c "rm -f /app/tmp/pids/*.pid && rake assets:precompile && SECRET_KEY_BASE=`rake secret` rails server -b 0.0.0.0" | ||
|
||
db: | ||
image: postgres | ||
image: postgres:9.4 | ||
ports: | ||
- "5432" | ||
- "5432" | ||
volumes: | ||
- .:/app | ||
- .:/public | ||
- data-db:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_DB=spectre | ||
|
||
volumes: | ||
data-db: {} |