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" }