From 3b8f7c5c8feddc948a5c06df036b8d8177a7f1e2 Mon Sep 17 00:00:00 2001 From: Phlex Date: Fri, 5 Apr 2024 08:39:43 -0600 Subject: [PATCH] Update dockerfile to respect database name variable. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff25f51..09b4c33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,10 +8,9 @@ WORKDIR /Get5API COPY . . RUN yarn RUN yarn build - # set config with env variables, build, and run application CMD envsubst < /Get5API/config/production.json.template > /Get5API/config/production.json && \ - yarn migrate-create-prod && \ + yarn db-migrate MYSQL_FLAGS=\"-CONNECT_WITH_DB\" --env production --config config/production.json db:create $DATABASE && \ yarn migrate-prod-upgrade && \ yarn startprod && \ yarn pm2 logs