forked from hhsadiq/NestForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (17 loc) · 731 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (17 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:22.21.0-alpine@sha256:bd26af08779f746650d95a2e4d653b0fd3c8030c44284b6b98d701c9b5eb66b9
RUN apk add --no-cache bash
RUN npm i -g @nestjs/cli typescript ts-node
COPY package*.json /tmp/app/
RUN cd /tmp/app && npm install
COPY . /usr/src/app
RUN cp -a /tmp/app/node_modules /usr/src/app
COPY ./scripts/wait-for-it.sh /opt/wait-for-it.sh
RUN chmod +x /opt/wait-for-it.sh
COPY ./scripts/startup.relational.dev.sh /opt/startup.relational.dev.sh
RUN chmod +x /opt/startup.relational.dev.sh
RUN sed -i 's/\r//g' /opt/wait-for-it.sh
RUN sed -i 's/\r//g' /opt/startup.relational.dev.sh
WORKDIR /usr/src/app
RUN if [ ! -f .env ]; then cp env-example-relational .env; fi
RUN npm run build
CMD ["/opt/startup.relational.dev.sh"]