Skip to content
Open
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
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated Dockerfile for Node.js Express front-end
FROM node:18-alpine

# Create app directory
WORKDIR /app

# Install dependencies
COPY package.json yarn.lock ./
RUN apk add --no-cache --virtual .gyp python3 make g++ \
&& yarn install --frozen-lockfile --production \
&& apk del .gyp

# Copy app source
COPY . .

# Expose default port used by server.js
ENV PORT=8079
EXPOSE 8079
ENV NODE_ENV=production

# Start application
CMD ["node", "server.js"]