Tune up the Rake task

This commit is contained in:
François Turbelin
2019-05-30 10:55:14 +02:00
parent 9df5d78f27
commit b4fe44510b
2 changed files with 10 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ services:
stdin_open: true
build: .
ports:
- 3006:3000
- 3000:3000
volumes:
- .:/usr/src/app
- gems:/bundles

View File

@@ -3,10 +3,18 @@ namespace :ofn do
desc 'Setup dev environment'
task setup: :environment do
p '== Entering setup'
# NOTE: Could be helpful to drop and create again the db here
#Rake::Task['db:drop'].invoke
#Rake::Task['db:create'].invoke
unless Spree::User.table_exists? && Spree::User.count
p '== Purge & Load sample data'
p '== Load data schema'
Rake::Task['db:schema:load'].invoke
# TODO: Integrate the tasks loading data
# Issue to reach stdin while creating Admin account
#Rake::Task['db:seed'].invoke
#Rake::Task['ofn:sample_data'].invoke
end
p '== Migrate'