From a4592459a4797f90d86445ccb6e6179d9bd3beff Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 26 Jan 2024 14:31:55 +1000 Subject: [PATCH] Add startup script --- Dockerfile | 4 ++-- docker/startup.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 docker/startup.sh diff --git a/Dockerfile b/Dockerfile index 79e4277..c914e6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,9 @@ RUN yarn # copy other files COPY tsconfig.json src . +COPY docker/startup.sh . COPY public ./public EXPOSE 3300 RUN yarn build -RUN yarn migrate up -CMD [ "yarn", "start"] +CMD [ "./startup.sh" ] diff --git a/docker/startup.sh b/docker/startup.sh new file mode 100755 index 0000000..87b56de --- /dev/null +++ b/docker/startup.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +yarn migrate up +yarn start