Commit 073276a4 authored by Zac Wood's avatar Zac Wood

Trying to make init.sh more reliable

- move rails db:seed to Dockerfile instead of docker-compose
- remove old server.pid files on startup
parent de69533a
Pipeline #2741 passed with stage
in 2 minutes and 18 seconds
......@@ -7,5 +7,4 @@ cd ../schedules_web
docker build . -t 'schedules_web'
cd ..
docker-compose up -d
docker-compose exec api rails db:seed
docker-compose up
......@@ -8,3 +8,4 @@ EXPOSE 3000
RUN bundle install
RUN rails db:migrate
RUN rails db:seed
......@@ -57,7 +57,6 @@ GEM
concurrent-ruby (1.0.5)
crass (1.0.4)
erubi (1.7.1)
execjs (2.7.0)
ffi (1.9.25)
globalid (0.4.1)
activesupport (>= 4.2.0)
......@@ -131,17 +130,6 @@ GEM
rubyzip (>= 1.1.6)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.13.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
......@@ -160,14 +148,11 @@ GEM
sqlite3 (1.3.13)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
turbolinks (5.1.1)
turbolinks-source (~> 5.1)
turbolinks-source (5.1.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.12)
execjs (>= 0.3.0, < 3)
web-console (3.6.2)
actionview (>= 5.0)
activemodel (>= 5.0)
......@@ -197,15 +182,13 @@ DEPENDENCIES
rack-cors
rails (~> 5.1.6)
rubyXL
sass-rails (~> 5.0)
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
BUNDLED WITH
1.16.1
1.16.2
......@@ -10,5 +10,11 @@ export SECRET_KEY_BASE=$(rails secret)
# rails db:migrate
# rails db:seed
# docker doesn't remove the server socket when the container is closed
# so remove it if it's still there
if [ -f tmp/pids/server.pid ]; then
rm tmp/pids/server.pid
fi
# start the server
rails s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment