Render is using ENTRYPOINT now
This commit is contained in:
@@ -9,4 +9,8 @@ echo "${*}"
|
|||||||
# ./bin/rails db:prepare
|
# ./bin/rails db:prepare
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
# Run database migrations when deploying to Render. It is not great, maybe there's a better way?
|
||||||
|
# https://community.render.com/t/release-command-for-db-migrations/247/6
|
||||||
|
if [ -z "$RENDER" ]; then echo "var is unset"; else bin/rails db:migrate; fi
|
||||||
|
|
||||||
exec "${@}"
|
exec "${@}"
|
||||||
|
|||||||
@@ -75,13 +75,6 @@ RUN useradd rails --create-home --shell /bin/bash && \
|
|||||||
chown -R rails:rails db log storage tmp
|
chown -R rails:rails db log storage tmp
|
||||||
USER rails:rails
|
USER rails:rails
|
||||||
|
|
||||||
# Run database migrations when deploying to Render. It is not great, maybe there's a better way?
|
|
||||||
# https://community.render.com/t/release-command-for-db-migrations/247/6
|
|
||||||
ARG RENDER
|
|
||||||
ARG DATABASE_URL
|
|
||||||
ARG SECRET_KEY_BASE
|
|
||||||
RUN if [ -z "$RENDER" ]; then echo "var is unset"; else bin/rails db:migrate; fi
|
|
||||||
|
|
||||||
# Entrypoint prepares the database.
|
# Entrypoint prepares the database.
|
||||||
ENTRYPOINT ["/rails/bin/docker-entrypoint-production"]
|
ENTRYPOINT ["/rails/bin/docker-entrypoint-production"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user