feat: dockerize
This commit is contained in:
parent
2b879489e9
commit
45be32b077
2 changed files with 9 additions and 1 deletions
|
@ -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"]
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
3
docker-entrypoint.sh
Executable file
3
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
dockerize -wait tcp://database:1502 -timeout 20s
|
||||
yarn start
|
Loading…
Reference in a new issue