Commit 6064c6a1 authored by Matheus Horstmann's avatar Matheus Horstmann 🐴
Browse files

add dockefile

parent 4ae88f66
FROM ruby:2.3.1
LABEL maintainer="horstmannmat <mch15@inf.ufpr.br>"
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
#Install apt-utils to prevent warning messages
RUN apt-get -y update -qq && apt-get install -y -qq apt-utils
# Install dependencies:
# - build-essential: To ensure certain gems can be compiled
# - nodejs: Compile assets
# - libpq-dev: Communicate with postgres through the postgres gem
# - wget curl and gnupg is used to get newest postgres client
# - software-properties-common to use the command lsb_release
RUN apt-get install -y -qq libpq-dev wget gnupg software-properties-common curl build-essential --fix-missing --no-install-recommends
#Get newest postgres client
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get -y update -qq && apt-get install -y -qq postgresql-client-9.6
# Set an environment variable to store where the app is installed to inside of the Docker image.
ENV INSTALL_PATH /app
RUN mkdir -p $INSTALL_PATH
# This sets the context of where commands will be ran in and is documented
# on Docker's website extensively.
WORKDIR $INSTALL_PATH
COPY . .
RUN gem install rails -v 4.1.15 && \
gem install bundler && \
# gem install bundler
bundle install -j 4
# bundle install -j 4
# Create a script to run as a command and reset database every time
RUN echo "#! /bin/bash" > /exec.sh &&\
# echo "rm -f /app/tmp/pids/server.pid && " >> /exec.sh && \
# echo "bundle install" >> /exec.sh && \
echo "bundle exec rake agendador:setup" >> /exec.sh && \
echo "RAILS_ENV=development bundle exec rails s -p 3000 -b '0.0.0.0'" >> /exec.sh && \
chmod +x /exec.sh
# Expose a volume so that apache2 will be able to read in assets in production.
VOLUME ["$INSTALL_PATH/public"]
EXPOSE 3000
CMD ["/bin/bash", "-c", "/exec.sh app/"]
# CMD /bin/bash
......@@ -7,7 +7,7 @@ gem 'rails', '~> 4.1.10'
# gem 'sqlite3'
# gem 'mysql2' # (Ignore this)
gem 'pg'
gem 'pg', '~> 0.11'
# Gems used only for assets and not required
# in production environments by default.
......@@ -110,7 +110,7 @@ gem 'correios-cep'
#Testes
group :test do
gem 'rspec'
gem 'capybara'
gem 'capybara'
gem 'factory_girl'
gem 'cucumber', "1.3.20"
gem 'cucumber-rails'
......
GIT
remote: git://github.com/yourabi/twitter-typeahead-rails.git
revision: fc343ac2f026589117bad0b7234c8bc69ef8bd6a
specs:
twitter-typeahead-rails (0.11.1.pre.corejavascript)
actionpack (>= 3.1)
jquery-rails
railties (>= 3.1)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.16)
actionpack (= 4.1.16)
actionview (= 4.1.16)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.16)
actionview (= 4.1.16)
activesupport (= 4.1.16)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.16)
activesupport (= 4.1.16)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.16)
activesupport (= 4.1.16)
builder (~> 3.1)
activerecord (4.1.16)
activemodel (= 4.1.16)
activesupport (= 4.1.16)
arel (~> 5.0.0)
activerecord-import (0.22.0)
activerecord (>= 3.2)
activesupport (4.1.16)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (5.0.1.20140414130214)
bcrypt (3.1.11)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
better_errors (2.4.0)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
builder (3.2.3)
cancancan (2.1.3)
capistrano (2.15.9)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (2.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
capybara-email (2.5.0)
capybara (~> 2.4)
mail
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
climate_control (0.2.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
colored (1.2)
concurrent-ruby (1.0.5)
connection_pool (2.2.1)
correios-cep (0.6.5)
log-me (~> 0.0.10)
ox (~> 2.8, >= 2.8.2)
cucumber (1.3.20)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-rails (1.5.0)
capybara (>= 1.1.2, < 3)
cucumber (>= 1.3.8, < 4)
mime-types (>= 1.17, < 4)
nokogiri (~> 1.5)
railties (>= 4, < 5.2)
debug_inspector (0.0.3)
devise (4.0.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
erubi (1.7.1)
erubis (2.7.0)
et-orbi (1.0.9)
tzinfo
execjs (2.7.0)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
ffi (1.9.23)
gherkin (2.12.2)
multi_json (~> 1.3)
highline (1.7.10)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jquery-cookie-rails (1.3.1.1)
railties (>= 3.2.0, < 5.0)
jquery-migrate-rails (1.2.1)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (1.8.6)
libv8 (3.16.14.19)
log-me (0.0.10)
mail (2.7.0)
mini_mime (>= 0.1.1)
maskedinput-rails (1.4.1.0)
materialize-sass (0.97.8)
sass (~> 3.3)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
multi_json (1.13.1)
multi_test (0.1.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (4.2.0)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
ox (2.8.4)
paperclip (4.3.7)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (= 0.3.0)
passenger (5.2.1)
rack
rake (>= 0.8.1)
pdf-core (0.7.0)
pg (0.21.0)
polyamorous (1.3.3)
activerecord (>= 3.0)
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)
prawn-table (0.2.2)
prawn (>= 1.3.0, < 3.0.0)
public_suffix (3.0.2)
puma (3.11.3)
rack (1.5.5)
rack-protection (2.0.1)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.16)
actionmailer (= 4.1.16)
actionpack (= 4.1.16)
actionview (= 4.1.16)
activemodel (= 4.1.16)
activerecord (= 4.1.16)
activesupport (= 4.1.16)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.16)
sprockets-rails (~> 2.0)
railties (4.1.16)
actionpack (= 4.1.16)
activesupport (= 4.1.16)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.0)
ransack (1.8.7)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
polyamorous (~> 1.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redis (4.0.1)
redis-namespace (1.6.0)
redis (>= 3.0.4)
ref (2.0.0)
responders (1.1.2)
railties (>= 3.2, < 4.2)
roo (2.7.1)
nokogiri (~> 1)
rubyzip (~> 1.1, < 2.0.0)
roo-xls (1.2.0)
nokogiri
roo (>= 2.0.0, < 3)
spreadsheet (> 0.9.0)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
ruby-ole (1.2.12.1)
rubyzip (1.2.1)
rufus-scheduler (3.4.2)
et-orbi (~> 1.0)
rvm-capistrano (1.5.6)
capistrano (~> 2.15.4)
safe_attributes (1.0.10)
activerecord (>= 3.0.0)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.10.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
sidekiq (5.1.1)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
rack-protection (>= 1.5.0)
redis (>= 3.3.5, < 5)
smarter_csv (1.2.3)
spreadsheet (1.1.5)
ruby-ole (>= 1.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
tabulous (2.1.4)
colored (~> 1.2.0)
rails (>= 3.0, < 6.0.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
ttfunk (1.5.1)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.7)
execjs (>= 0.3.0, < 3)
warden (1.2.7)
rack (>= 1.0)
watu_table_builder (0.3.0)
will_paginate (3.1.6)
xpath (3.0.0)
nokogiri (~> 1.8)
yard (0.9.12)
PLATFORMS
ruby
DEPENDENCIES
activerecord-import
bcrypt-ruby
better_errors
binding_of_caller
cancancan
capybara
capybara-email
coffee-rails
colored
correios-cep
cucumber (= 1.3.20)
cucumber-rails
devise (~> 4.0.1)
execjs
factory_girl
jquery-cookie-rails
jquery-migrate-rails
jquery-rails
jquery-ui-rails (~> 4.2.1)
maskedinput-rails
materialize-sass (~> 0.97.6)
paperclip (~> 4.2)
passenger
pg (~> 0.11)
prawn
prawn-table
puma
rack-protection
rails (~> 4.1.10)
ransack
redis-namespace
roo
roo-xls
rspec
rufus-scheduler
rvm-capistrano
safe_attributes
sass-rails
selenium-webdriver
sidekiq
smarter_csv
tabulous
therubyracer
twitter-typeahead-rails!
uglifier
watu_table_builder
will_paginate
yard
BUNDLED WITH
1.16.1
development:
adapter: postgresql
encoding: utf-8
database: development
pool: 5
host: <%= ENV['POSTGRES_HOST'] %>
username: postgres
password: 123456
version: "3" # version matters, see https://docs.docker.com/compose/networking/
networks:
backend:
services:
agendador-postgres:
image: postgres:9.6
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
networks:
backend:
agendador-backend:
build: .
volumes:
- .:/app/
environment:
PGHOST: agendador-postgres
ports:
- '3000:3000'
depends_on:
- agendador-postgres
networks:
backend:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment