From 8568811c7dd273b6703e0e37aaf905b4861b4169 Mon Sep 17 00:00:00 2001 From: Dinis Date: Fri, 21 Aug 2020 15:33:49 +0100 Subject: [PATCH] Update docker-compose config for HyperV compatibility (owner issues are avoided by using named volumes). --- app/views/pages/home.html.erb | 1 - db/seeds.rb | 2 +- docker-compose.yml | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb index c5764c6..3453cf2 100644 --- a/app/views/pages/home.html.erb +++ b/app/views/pages/home.html.erb @@ -1,3 +1,2 @@

Pages#home

Find me in app/views/pages/home.html.erb

-

Find me in app/views/pages/home.html.erb

diff --git a/db/seeds.rb b/db/seeds.rb index 16f4b1e..696ec03 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,4 +5,4 @@ # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) -admin = Admin.create([{email: 'admin@example.org', password: 'password'}]) \ No newline at end of file +admin = Admin.create([{email: 'admin@example.org', password: 'password', confirmed_at: '2020-08-21 11:08:12'}]) diff --git a/docker-compose.yml b/docker-compose.yml index b31969c..b59727b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: db: image: postgres volumes: - - ./tmp/db:/var/lib/postgresql/data + - psql:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: password web: @@ -11,7 +11,11 @@ services: command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" volumes: - .:/myapp + - webtmp:/myapp/tmp ports: - "3000:3000" depends_on: - - db \ No newline at end of file + - db +volumes: + psql: + webtmp: \ No newline at end of file