Skip to content

fix: dockerfile deps and cmd #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ ARG GA_TRACKING_ID
# Define environment variables
ENV PORT 3000
ENV HOST 0.0.0.0
ENV GA_TRACKING_ID ${GA_TRACKING_ID}
ENV GA_TRACKING_ID $GA_TRACKING_ID

# Define project dir
WORKDIR /usr/src/app

# Install OS deps necessary by some packages (e.g.: node-canvas)
RUN apk add --update --no-cache \
make \
g++ \
jpeg-dev \
cairo-dev \
giflib-dev \
pango-dev

# Install dependencies
COPY package*.json ./
RUN npm install
Expand All @@ -24,4 +33,4 @@ RUN npm run build

# Expose port and start command
EXPOSE $PORT
CMD [ "npm", "start" ]
CMD npm start -- -p $PORT
2 changes: 1 addition & 1 deletion docusaurus/docs/what-is-included/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Example:
ARG SOME_ARGUMENT

# Define environment variables
ENV SOME_ENV_VAR ${SOME_ARGUMENT}
ENV SOME_ENV_VAR $SOME_ARGUMENT
```

You can check the existing `Dockerfile` to see how we're configuring `GA_TRACKING_ID` for an example on this process.