mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
add dockerfile and docker-compose.yml
This commit is contained in:
parent
e109c5b7ed
commit
3977ced331
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
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
|
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: '2'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_DB=fixer
|
||||
fixer:
|
||||
build: .
|
||||
command: bundle exec unicorn -p 8080 -c /fixer-io/config/unicorn.rb
|
||||
volumes:
|
||||
- .:/fixer-io
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
- RACK_ENV=production
|
||||
- DATABASE_URL=postgres://postgres:mysecretpassword@postgres/fixer
|
||||
depends_on:
|
||||
- postgres
|
Loading…
Reference in New Issue
Block a user