aboutsummaryrefslogtreecommitdiffstats
path: root/bin/docker-entrypoint
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-12-17 14:26:17 +0000
committerMatthew Lemon <y@yulqen.org>2023-12-17 14:26:17 +0000
commitc84b94a647fb4c068e8be9d0495ff7284f41f168 (patch)
treed969c75c764436c0478234233597e38e1e29c2d5 /bin/docker-entrypoint
Initial
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..67ef493
--- /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 [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
+ ./bin/rails db:prepare
+fi
+
+exec "${@}"