mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-01-19 11:18:33 -05:00
30 lines
634 B
Docker
30 lines
634 B
Docker
# prereq: first do `yarn build` to compile typescript & etc.
|
|
|
|
FROM node:19-alpine
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install PM2 globally
|
|
RUN yarn global add pm2
|
|
|
|
# Remove?
|
|
COPY tsconfig.json ./
|
|
|
|
# first get dependencies in for efficient docker layering
|
|
COPY dist/package.json dist/yarn.lock ./
|
|
RUN yarn install --frozen-lockfile --production
|
|
|
|
# then copy over typescript payload
|
|
COPY dist ./
|
|
|
|
# Copy the PM2 ecosystem configuration
|
|
COPY ecosystem.config.js ./
|
|
|
|
ENV PORT=80
|
|
EXPOSE 80/tcp
|
|
# EXPOSE 8090/tcp
|
|
# EXPOSE 8091/tcp
|
|
# EXPOSE 8092/tcp
|
|
|
|
# Use PM2 to run the application with the ecosystem config
|
|
CMD ["pm2-runtime", "ecosystem.config.js"]
|