Skip to content

Commit 23c7f4a

Browse files
committed
split server to container runtime
1 parent a9f4973 commit 23c7f4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ RUN bundle install && \
4646
echo "Compiling webpack assets..." && \
4747
rails webpacker:compile ; \
4848
fi && \
49-
rails db:setup
49+
rails db:setup && \
50+
rake db:migrate && \
51+
rm -f tmp/pids/server.pid
5052

5153
# This image should expose the port 3000.
5254
# This does not actually expose the port, you'll have to expose it yourself by
@@ -55,6 +57,4 @@ RUN bundle install && \
5557
EXPOSE 3000/tcp
5658

5759
# Finally, start the server!
58-
RUN rake db:migrate && \
59-
rm -f tmp/pids/server.pid && \
60-
rails server -b 0.0.0.0
60+
CMD rails server -b 0.0.0.0

0 commit comments

Comments
 (0)