Skip to content
Merged
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
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ENV NODE_OPTIONS=--max_old_space_size=2078
# Run App build within container context
RUN npx reactium install && npm run build

# Remove Development Deps before next stage
RUN npm prune --production

# Deployable Stage
Expand All @@ -27,17 +28,19 @@ FROM node:lts-hydrogen
# Create app directory
WORKDIR /usr/src/app

# Includes all build assets
COPY --from=build /tmp/app/public ./public

# Dependencies of server
COPY --from=build /tmp/app/package.json ./package.json
COPY --from=build /tmp/app/node_modules ./node_modules
COPY --from=build /tmp/app/reactium_modules ./reactium_modules

# Includes all server src and built assets
COPY --from=build /tmp/app/src ./src
COPY --from=build /tmp/app/public ./public

RUN chown -R node ./

USER node

EXPOSE 3030

CMD [ "node", "./build/.core/index.js" ]
CMD [ "npm", "start" ]