From 9e07c1ef00201d57755ad6e5fb2b186e50b477f7 Mon Sep 17 00:00:00 2001 From: Stefan Peters Date: Tue, 15 Oct 2024 11:10:44 +0200 Subject: [PATCH] Docker setup: Make BARTOC service wait for JSKOS Server --- docker/Dockerfile | 2 +- docker/ecosystem.config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d458fa9..da2ce80 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,6 +29,6 @@ RUN git clone https://github.com/gbv/jskos-server.git && cd jskos-server && npm RUN mkdir /config # Use pm2 to run app -RUN npm i -g pm2 +RUN npm i -g pm2 wait-on CMD ["bash", "entrypoint.sh"] diff --git a/docker/ecosystem.config.json b/docker/ecosystem.config.json index e0b8233..b7ec481 100644 --- a/docker/ecosystem.config.json +++ b/docker/ecosystem.config.json @@ -3,7 +3,7 @@ { "name": "bartoc", "cwd": "./bartoc", - "script": "./server.js", + "script": "wait-on http://localhost:3000/status && node ./server.js", "env": { "NODE_ENV": "production" }