Docker: Always run migrations on compose up

This commit is contained in:
2022-09-26 16:18:42 +02:00
parent b5d2b68294
commit e72b098dab
2 changed files with 2 additions and 2 deletions

View File

@@ -2,6 +2,6 @@ version: "3.7"
services: services:
bot: 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: ports:
- "9229:9229" - "9229:9229"

View File

@@ -3,7 +3,7 @@ version: "3.7"
services: services:
bot: bot:
build: . 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 restart: unless-stopped
environment: environment:
- TZ=Europe/Berlin - TZ=Europe/Berlin