-
Notifications
You must be signed in to change notification settings - Fork 120
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 #31 from 18F/sbc_docker_compose
Add docker support
- Loading branch information
Showing
11 changed files
with
140 additions
and
121 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,7 @@ | ||
Dockerfile | ||
tmp | ||
log | ||
node_modules | ||
db/*.sqlite3 | ||
*.md | ||
.git* |
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,18 @@ | ||
FROM rails:4.2.6 | ||
|
||
WORKDIR /upaya | ||
|
||
COPY Gemfile /upaya | ||
COPY Gemfile.lock /upaya | ||
RUN bundler install --without deployment deploy | ||
|
||
# This container supports running tests and as such requires the phantomjs | ||
# binary in the PATH. | ||
# TOOD(sbc): Create a separate production container without this. | ||
RUN mkdir /usr/local/phantomjs && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar jx -C /usr/local/phantomjs --strip-components=1 | ||
RUN ln -s ../phantomjs/bin/phantomjs /usr/local/bin/phantomjs | ||
|
||
COPY . /upaya | ||
|
||
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
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,3 @@ | ||
web: env bin/rails s | ||
worker: bundle exec sidekiq -q sms -q mailers | ||
mail: bundle exec mailcatcher -f |
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 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 @@ | ||
version: '2' | ||
services: | ||
worker: | ||
build: . | ||
command: "bundle exec sidekiq -q sms -q mailers" | ||
environment: | ||
REDIS_URL: "redis://redis" | ||
DATABASE_URL: "postgres://postgres@db" | ||
SMTP_HOST: "mailcatcher" | ||
depends_on: | ||
- db | ||
- redis | ||
- mailcatcher | ||
web: | ||
build: . | ||
volumes: | ||
- .:/upaya | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
REDIS_URL: "redis://redis" | ||
DATABASE_URL: "postgres://postgres@db" | ||
depends_on: | ||
- db | ||
- redis | ||
- worker | ||
db: | ||
image: postgres | ||
redis: | ||
image: redis | ||
mailcatcher: | ||
image: yappabe/mailcatcher | ||
ports: | ||
- 1080:1080 |
This file was deleted.
Oops, something went wrong.