mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
Simplify Docker files
This commit is contained in:
parent
d7b6e8c898
commit
1158b6ffee
21
Dockerfile
21
Dockerfile
@ -1,16 +1,9 @@
|
|||||||
FROM ruby:2.3.0
|
FROM ruby:2.3.0
|
||||||
|
|
||||||
ENV WORKER_PROCESSES 4
|
RUN mkdir /app
|
||||||
ENV DATABASE_URL postgres://postgres:mysecretpassword@postgres/fixer
|
WORKDIR /app
|
||||||
ENV VERSION 1
|
ADD Gemfile /app/Gemfile
|
||||||
|
ADD Gemfile.lock /app/Gemfile.lock
|
||||||
RUN mkdir /fixer-io
|
RUN bundle install --without development test
|
||||||
WORKDIR /fixer-io
|
ADD . /app
|
||||||
ADD Gemfile /fixer-io/Gemfile
|
CMD bundle exec unicorn -c /app/config/unicorn.rb
|
||||||
ADD Gemfile.lock /fixer-io/Gemfile.lock
|
|
||||||
RUN bundle install --deployment --without development:test
|
|
||||||
ADD . /fixer-io
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
CMD bundle exec unicorn -p 8080 -c /fixer-io/config/unicorn.rb
|
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
postgres:
|
db:
|
||||||
image: postgres
|
image: postgres
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
environment:
|
web:
|
||||||
- POSTGRES_DB=fixer
|
|
||||||
fixer:
|
|
||||||
build: .
|
build: .
|
||||||
command: bundle exec unicorn -p 8080 -c /fixer-io/config/unicorn.rb
|
|
||||||
volumes:
|
volumes:
|
||||||
- .:/fixer-io
|
- .:/app
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
environment:
|
environment:
|
||||||
- RACK_ENV=production
|
- RACK_ENV=production
|
||||||
- DATABASE_URL=postgres://postgres:mysecretpassword@postgres/fixer
|
- DATABASE_URL=postgres://postgres@db/postgres
|
||||||
depends_on:
|
links:
|
||||||
- postgres
|
- db
|
||||||
|
Loading…
Reference in New Issue
Block a user