From e72b098dab05b036d9544c15a88212dfe2529166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Mon, 26 Sep 2022 16:18:42 +0200 Subject: [PATCH] Docker: Always run migrations on compose up --- docker-compose-dev.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 40a3fef..36d7251 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -2,6 +2,6 @@ version: "3.7" services: bot: - command: sh -c "npm config set cache /app/.npm_cache --global && npm install && npm run dev" + command: sh -c "npm config set cache /app/.npm_cache --global && npm install && npx sequelize db:migrate && npm run dev" ports: - "9229:9229" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 3e34f8c..7677bc2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.7" services: bot: build: . - command: sh -c "npm config set cache /app/.npm_cache --global && npm install && node ." + command: sh -c "npm config set cache /app/.npm_cache --global && npm install && npx sequelize db:migrate && node ." restart: unless-stopped environment: - TZ=Europe/Berlin