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
|
||||
|
||||
ENV WORKER_PROCESSES 4
|
||||
ENV DATABASE_URL postgres://postgres:mysecretpassword@postgres/fixer
|
||||
ENV VERSION 1
|
||||
|
||||
RUN mkdir /fixer-io
|
||||
WORKDIR /fixer-io
|
||||
ADD Gemfile /fixer-io/Gemfile
|
||||
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
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
ADD Gemfile /app/Gemfile
|
||||
ADD Gemfile.lock /app/Gemfile.lock
|
||||
RUN bundle install --without development test
|
||||
ADD . /app
|
||||
CMD bundle exec unicorn -c /app/config/unicorn.rb
|
||||
|
@ -1,20 +1,17 @@
|
||||
version: '2'
|
||||
services:
|
||||
postgres:
|
||||
db:
|
||||
image: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_DB=fixer
|
||||
fixer:
|
||||
web:
|
||||
build: .
|
||||
command: bundle exec unicorn -p 8080 -c /fixer-io/config/unicorn.rb
|
||||
volumes:
|
||||
- .:/fixer-io
|
||||
- .:/app
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
- RACK_ENV=production
|
||||
- DATABASE_URL=postgres://postgres:mysecretpassword@postgres/fixer
|
||||
depends_on:
|
||||
- postgres
|
||||
- DATABASE_URL=postgres://postgres@db/postgres
|
||||
links:
|
||||
- db
|
||||
|
Loading…
Reference in New Issue
Block a user