Added pid file autoremoving

This commit is contained in:
Pavel Pivovarov
2021-03-17 18:51:17 +11:00
parent bc33308223
commit d50a1f0ff1
3 changed files with 9 additions and 21 deletions

View File

@@ -8,7 +8,8 @@ RUN apk add --no-cache \
yarn \
sqlite-dev \
bash \
postgresql-dev
postgresql-dev \
python2
WORKDIR /app
@@ -31,7 +32,11 @@ VOLUME /app/db/database
RUN yarn install --check-files; bundle exec rake assets:precompile
RUN apk del \
git \
python2 \
build-base
EXPOSE 3000
ENTRYPOINT ["/bin/bash"]
CMD ["/app/entrypoint.sh"]
CMD if [ -f /app/tmp/pids/server.pid ]; then rm -f /app/tmp/pids/server.pid; fi && cd /app && bundle exec rake 'db:migrate' && bundle exec rails server -b 0.0.0.0