Skip to content

Commit 8ff3079

Browse files
committed
dbsetup
1 parent d3ee4e8 commit 8ff3079

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

bin/dbsetup

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
rails db:create
4+
rails db:migrate
5+
rails db:seed
6+
rails db:create RAILS_ENV=test

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ services:
7575
depends_on:
7676
- db
7777
- redis
78-
command: sh -c "rails db:create && rails db:migrate && rails db:seed"
78+
command: sh sh bin/dbsetup
7979

8080
# ****************
8181
# Tools

docker/unit/Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
postgres: postgres -D /srv/postgres
22
redis: redis-server
3-
rails: rails assets:precompile; sh waitpg.sh; rails db:create; rails db:migrate; rails db:seed; sh waitredis.sh; bundle exec rails s -b 0.0.0.0 -p 3000
3+
rails: rails assets:precompile; sh waitpg.sh; sh bin/dbsetup; sh waitredis.sh; bundle exec rails s -b 0.0.0.0 -p 3000
44
sidekiq: sh waitpg.sh && sh waitredis.sh && sleep 5 && bundle exec sidekiq -C config/sidekiq.yml

0 commit comments

Comments
 (0)