diff --git a/Dockerfile b/Dockerfile index e35a7d1..aef5043 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM phusion/passenger-ruby22:latest RUN apt-get update \ - && apt-get upgrade -y \ + && apt-get upgrade -y --force-yes \ && apt-get install -y ruby2.3 ruby2.3-dev \ && ruby-switch --set ruby2.3 diff --git a/Gemfile b/Gemfile index 6b59e64..fe0094f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,6 @@ source 'https://rubygems.org' gem 'rails', '5.0.0' gem 'sqlite3' -gem 'mysql2', '~> 0.3.18' gem 'pg', '~> 0.18.4' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index 5d6bd3f..40825ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,6 @@ GEM mini_portile2 (2.1.0) minitest (5.9.0) multi_json (1.12.1) - mysql2 (0.3.21) nenv (0.3.0) nio4r (1.2.1) nokogiri (1.6.8) @@ -236,7 +235,6 @@ DEPENDENCIES guard-rspec jbuilder (~> 2.5) jquery-rails (~> 4.1.1) - mysql2 (~> 0.3.18) pg (~> 0.18.4) rails (= 5.0.0) rspec-rails (~> 3.5.0) @@ -249,4 +247,4 @@ DEPENDENCIES web-console (~> 3.3.1) BUNDLED WITH - 1.11.2 + 1.12.5 diff --git a/config/database.yml b/config/database.yml index e4f5a58..1674fe4 100644 --- a/config/database.yml +++ b/config/database.yml @@ -21,12 +21,12 @@ test: database: db/test.sqlite3 docker: - adapter: mysql2 + adapter: postgresql pool: 5 timeout: 5000 - host: mysql + host: postgres username: parsley - password: password + password: mysecretpassword database: parsley production: diff --git a/docker-compose.yml b/docker-compose.yml index 8d9c6d2..a257613 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,19 @@ -mysql: - image: mysql:5.6 - environment: - - MYSQL_ROOT_PASSWORD=mysupersecret - - MYSQL_DATABASE=parsley - - MYSQL_USER=parsley - - MYSQL_PASSWORD=password - volumes_from: - - parsley_db_data +version: '2' - -web: - build: . - ports: - - "3000:80" - links: - - mysql \ No newline at end of file +services: + postgres: + image: postgres:9.3 + environment: + - POSTGRES_PASSWORD=mysecretpassword + - POSTGRES_USER=parsley + volumes: + - sql-data:/var/lib/postgresql/data + web: + build: . + ports: + - "3000:80" + links: + - postgres +volumes: + sql-data: + driver: local \ No newline at end of file