diff --git a/docker/handshake-api/Dockerfile b/docker/handshake-api/Dockerfile index 22826b4e..bf0b09bb 100644 --- a/docker/handshake-api/Dockerfile +++ b/docker/handshake-api/Dockerfile @@ -2,19 +2,16 @@ FROM node:14.6.0 WORKDIR /usr/app -RUN yarn init -y && \ - yarn add express express-http-proxy hs-client +RUN yarn init -y +RUN yarn add express express-http-proxy hs-client -COPY handshake-api/index.js ./ - -ENV HOST="localhost" -ENV PORT=3100 +COPY *.js ./ ENV HSD_NETWORK="main" ENV HSD_HOST="0.0.0.0" ENV HSD_PORT=12037 ENV HSD_API_KEY="foo" -EXPOSE $PORT - -ENTRYPOINT ["node", "index.js"] +EXPOSE 3100 +ENV NODE_ENV production +CMD [ "node", "index.js" ] diff --git a/handshake-api/index.js b/docker/handshake-api/index.js similarity index 100% rename from handshake-api/index.js rename to docker/handshake-api/index.js diff --git a/docker/health-check/Dockerfile b/docker/health-check/Dockerfile index a76537a6..8e907f10 100644 --- a/docker/health-check/Dockerfile +++ b/docker/health-check/Dockerfile @@ -5,7 +5,8 @@ WORKDIR /usr/app RUN yarn init -y RUN yarn add express body-parser lowdb node-schedule superagent lodash http-status-codes -EXPOSE 3100 +COPY *.js ./ +EXPOSE 3100 ENV NODE_ENV production -CMD [ "node", "health-check/index.js" ] +CMD [ "node", "index.js" ] diff --git a/health-check/checks.js b/docker/health-check/checks.js similarity index 100% rename from health-check/checks.js rename to docker/health-check/checks.js diff --git a/health-check/db.js b/docker/health-check/db.js similarity index 100% rename from health-check/db.js rename to docker/health-check/db.js diff --git a/health-check/endpointHealthCheck.js b/docker/health-check/endpointHealthCheck.js similarity index 100% rename from health-check/endpointHealthCheck.js rename to docker/health-check/endpointHealthCheck.js diff --git a/health-check/index.js b/docker/health-check/index.js similarity index 100% rename from health-check/index.js rename to docker/health-check/index.js diff --git a/health-check/schedule.js b/docker/health-check/schedule.js similarity index 100% rename from health-check/schedule.js rename to docker/health-check/schedule.js