diff --git a/Dockerfile b/Dockerfile index d1f2610..3228748 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,9 @@ FROM node:18.17.1 + +ENV DOCKERIZE_VERSION v0.2.0 +RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + RUN mkdir app WORKDIR /app COPY . . @@ -6,4 +11,4 @@ RUN yarn install RUN yarn build -ENTRYPOINT ["yarn", "start"] \ No newline at end of file +ENTRYPOINT ["./docker-entrypoint.sh"] \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..c8b7228 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash +dockerize -wait tcp://database:1502 -timeout 20s +yarn start \ No newline at end of file