generated from leonardofficial/template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 941 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM node:12-alpine
WORKDIR /app
# install build dependencies
RUN apk add --no-cache \
bash \
git \
make
# install application dependencies
COPY package.json ./
#RUN JOBS=max yarn install --non-interactive --frozen-lockfile
# copy in application source
COPY . .
# compile sources
#RUN make lib
# prune modules
#RUN yarn install --non-interactive --frozen-lockfile --production
RUN npm install
RUN npm install -g typescript
RUN npm install -g ts-node
# copy built application to runtime image
#FROM node:12-alpine
#WORKDIR /app
#COPY --from=build-stage /app/config config
#COPY --from=build-stage /app/lib lib
#COPY --from=build-stage /app/node_modules node_modules
# setup default env
ENV NODE_ENV production
# install wait script
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
RUN chmod +x /wait
## Launch the wait tool and then your application
CMD /wait && ts-node src/index.ts