From 45be32b0779fc6778fc1fcb39e95d68ba44b5148 Mon Sep 17 00:00:00 2001 From: Migan178 Date: Sat, 23 Sep 2023 14:53:56 +0900 Subject: [PATCH] feat: dockerize --- Dockerfile | 7 ++++++- docker-entrypoint.sh | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 docker-entrypoint.sh 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