mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 23:53:15 +01:00
fix finally server pid issue at docker container restart
This commit is contained in:
parent
d58e0091bb
commit
28ade2a8d9
2 changed files with 12 additions and 0 deletions
4
Dockerfile
Normal file → Executable file
4
Dockerfile
Normal file → Executable file
|
@ -16,5 +16,9 @@ RUN bundle install
|
||||||
ADD . /app
|
ADD . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY ./docker-entrypoint.sh /
|
||||||
|
RUN chmod +x docker-entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
CMD ["rails", "server", "-b", "0.0.0.0"]
|
CMD ["rails", "server", "-b", "0.0.0.0"]
|
||||||
|
|
8
docker-entrypoint.sh
Executable file
8
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -f ./tmp/pids/server.pid ]; then
|
||||||
|
rm ./tmp/pids/server.pid
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec bundle exec "$@"
|
Loading…
Reference in a new issue