Dockerを使用している場合、アプデの際にマイグレを自動実行するように

This commit is contained in:
syuilo 2019-05-16 16:12:30 +09:00
parent 70d710c9a9
commit a21357248f
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 2 additions and 1 deletions

View File

@ -39,4 +39,4 @@ COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
COPY . ./
CMD ["npm", "start"]
CMD ["npm", "migrateandstart"]

View File

@ -14,6 +14,7 @@
"init": "node ./built/init.js",
"ormconfig": "node ./built/ormconfig.js",
"migrate": "npm run ormconfig && ts-node ./node_modules/typeorm/cli.js migration:run",
"migrateandstart": "npm run migrate && npm run start",
"build": "webpack && gulp build",
"webpack": "webpack",
"watch": "webpack --watch",