Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 7cabe76

Browse files
committed
Fix issue with dev dependencies
1 parent 03a0c19 commit 7cabe76

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ LABEL Description="This image is used to start the hc-api-feathers" Vendor="Huma
44
# expose the app port
55
EXPOSE 3030
66

7+
# override configuration by instance name in docker container
8+
ENV NODE_APP_INSTANCE=docker
9+
ENV NODE_ENV=production
10+
711
# create working directory
812
RUN mkdir -p /API
913
WORKDIR /API
@@ -17,14 +21,10 @@ RUN yarn global add pm2
1721
# install app dependencies
1822
COPY package.json /API
1923
COPY yarn.lock /API
20-
RUN yarn install --frozen-lockfile --non-interactive
24+
RUN yarn install --production=false --frozen-lockfile --non-interactive
2125

2226
RUN apk del build-dependencies
2327

24-
# override configuration by instance name in docker container
25-
ENV NODE_APP_INSTANCE=docker
26-
# must be after `yarn install`
27-
ENV NODE_ENV=production
2828

2929
# copy the code to the docker image
3030
COPY . /API

docker-compose.override.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ services:
77
ports:
88
- "3030:3030"
99
- "9229:9229" # node inspect
10+
volumes:
11+
- .:/API
12+
- /API/node_modules
1013
command: yarn run dev

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ services:
77
- mongo
88
networks:
99
- hc-network
10-
volumes:
11-
- .:/API
1210
mongo:
1311
image: mongo
1412
networks:

0 commit comments

Comments
 (0)