Skip to content

Commit f13428b

Browse files
committed
fix: dockerfile deps and cmd
- The intl package needs some OS deps - The CMD now correctly starts the server on $PORT
1 parent 19de803 commit f13428b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Dockerfile

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@ ARG GA_TRACKING_ID
77
# Define environment variables
88
ENV PORT 3000
99
ENV HOST 0.0.0.0
10-
ENV GA_TRACKING_ID ${GA_TRACKING_ID}
10+
ENV GA_TRACKING_ID $GA_TRACKING_ID
1111

1212
# Define project dir
1313
WORKDIR /usr/src/app
1414

15+
# Install OS deps necessary by some packages (e.g.: node-canvas)
16+
RUN apk add --update --no-cache \
17+
make \
18+
g++ \
19+
jpeg-dev \
20+
cairo-dev \
21+
giflib-dev \
22+
pango-dev
23+
1524
# Install dependencies
1625
COPY package*.json ./
1726
RUN npm install
@@ -24,4 +33,4 @@ RUN npm run build
2433

2534
# Expose port and start command
2635
EXPOSE $PORT
27-
CMD [ "npm", "start" ]
36+
CMD npm start -- -p $PORT

0 commit comments

Comments
 (0)