From 0756b9ec350620297eb652d4e2eae79fda601469 Mon Sep 17 00:00:00 2001 From: chenjing Date: Mon, 8 Jul 2019 15:18:17 +0800 Subject: [PATCH] aa --- Gemfile | 1 + Gemfile.lock | 2 ++ app/controllers/invote_controller.rb | 7 +++++++ docker-compose.yml | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index 15a1eaf..438b4e2 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,7 @@ gem 'rails', '~> 5.2.3' # Use sqlite3 as the database for Active Record gem 'puma', '~> 3.11' gem 'redis', '~> 4.0' +gem 'sqlite3' gem 'redis-rails', '~> 5' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' diff --git a/Gemfile.lock b/Gemfile.lock index ba568d2..09f3685 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,6 +188,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) + sqlite3 (1.4.1) thor (0.20.3) thread_safe (0.3.6) tilt (2.0.9) @@ -229,6 +230,7 @@ DEPENDENCIES selenium-webdriver spring spring-watcher-listen (~> 2.0.0) + sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) diff --git a/app/controllers/invote_controller.rb b/app/controllers/invote_controller.rb index 8f5ae3a..b4d838b 100644 --- a/app/controllers/invote_controller.rb +++ b/app/controllers/invote_controller.rb @@ -5,6 +5,13 @@ class InvoteController < ApplicationController end def create + redis = Redis.new + redis.set() + end + private + + def params + end end diff --git a/docker-compose.yml b/docker-compose.yml index 905c550..1a2ae7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,10 @@ services: dockerfile: ./docker/app/DockerFile depends_on: - redis + db: + image: sqlite3 + volumes: + - sqlite_data:/var/lib/sqlite/data redis: image: redis:alpine web: