Skip to content

Commit 4a56abb

Browse files
committed
Remove db:migrate and exec "$@" from production entrypoint.
Currently, db:migrate fails in production because migrations were defined in SQLite instead of MySQL. This matters since the two handle references differently (MySQL uses bigints), so some migrations involving them fail.
1 parent 5e704d6 commit 4a56abb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docker/production/entrypoint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ set -e
66
rm -f ./tmp/pids/server.pid
77

88
# Make sure db is ready to go
9-
# Adding '2>/dev/null' sends output to nowhere in the case of an error and the
10-
# error code also triggers the bash OR to run db:setup
11-
bundle exec rails db:migrate
9+
# TODO: uncomment once we migrate development DB to MySQL
10+
# This line fails because of differences between SQLite (where migrations were created)
11+
# and production MySQL
12+
# bundle exec rails db:migrate
1213

1314
# Then exec the container's main process (CMD in the Dockerfile).
14-
exec "$@"
15+
# TODO: Uncomment once we migrate development DB to MySQL
16+
# exec "$@"

0 commit comments

Comments
 (0)