summaryrefslogtreecommitdiffhomepage
path: root/bin/docker-entrypoint
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-30 19:03:22 +0900
committerAdam Malczewski <[email protected]>2026-03-30 19:03:22 +0900
commit952c6b565832dd0dbcef7a9a80edc871f79e15a8 (patch)
tree698db27a35f8f40356a0381a32a02767481dc6a9 /bin/docker-entrypoint
downloaddispatch-api-952c6b565832dd0dbcef7a9a80edc871f79e15a8.tar.gz
dispatch-api-952c6b565832dd0dbcef7a9a80edc871f79e15a8.zip
Diffstat (limited to 'bin/docker-entrypoint')
-rwxr-xr-xbin/docker-entrypoint8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint
new file mode 100755
index 0000000..ed31659
--- /dev/null
+++ b/bin/docker-entrypoint
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+# If running the rails server then create or migrate existing database
+if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
+ ./bin/rails db:prepare
+fi
+
+exec "${@}"