Skip to content
This repository was archived by the owner on Jan 28, 2024. It is now read-only.

Commit d4169fa

Browse files
committed
fix: stop npm from swallowing exit signals; run migrations on launch
1 parent ce6d190 commit d4169fa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ services:
4747
ports:
4848
- "127.0.0.1:${SERVICE_PORT:-8204}:${SERVICE_PORT:-8204}"
4949
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
50-
command: ["npm", "run", "start:migrate"]
5150

5251
volumes:
5352
ydh-community-contacts-api-db-data:

src/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const Fastify = require("fastify");
22
const startServer = require("./server");
33
const getConfig = require("./config");
4+
const migrate = require("./migrate");
45

56
/**
67
* @author Frazer Smith
@@ -14,6 +15,7 @@ const main = async () => {
1415
});
1516

1617
const config = await getConfig();
18+
await migrate();
1719

1820
const server = Fastify(config.fastifyInit);
1921
server.register(startServer, config);

0 commit comments

Comments
 (0)