File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 55! package.json
66! tsconfig.build.json
77! tsconfig.json
8+ ! entrypoint.sh
Original file line number Diff line number Diff line change @@ -12,17 +12,20 @@ RUN npm run build
1212
1313FROM base as production
1414
15+ RUN apt-get update
16+ RUN apt-get install -y postgresql-client
17+
1518ENV NODE_ENV=production
1619
1720USER node
1821WORKDIR /home/node/app
1922
20- COPY package.json package-lock.json ./
23+ COPY package.json package-lock.json entrypoint.sh ./
2124RUN npm ci
2225
2326COPY --from=production_buildstage /home/node/app/dist /home/node/app/dist
2427
25- ENTRYPOINT ["npm" , "run" , "start:prod " ]
28+ CMD ["./entrypoint.sh " ]
2629
2730FROM base as development
2831
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ echo " Looking for the database ..."
4+ while ! pg_isready -q -d $STORAGE_URI
5+ do
6+ echo " Waiting for database."
7+ sleep 2
8+ done
9+ echo " Found database."
10+ echo " Starting the application..."
11+
12+ npm run start:prod
You can’t perform that action at this time.
0 commit comments