Skip to content

Commit

Permalink
fix: update Docker configuration to run server directly with node
Browse files Browse the repository at this point in the history
  • Loading branch information
ithsjeff committed Nov 15, 2024
1 parent f7b935b commit 7a190a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ FROM node:18-alpine

WORKDIR /app

# Copy built assets from builder
# Copy only necessary files from builder
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/build ./build
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json .
COPY --from=builder /app/node_modules ./node_modules

# Set environment variables
Expand All @@ -49,4 +49,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/ || exit 1

# Command to run the app
CMD ["yarn", "remix-serve", "./build/index.js"]
CMD ["node", "./build/index.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "remix build",
"dev": "remix dev",
"start": "remix-serve ./build/index.js",
"start": "node ./build/index.js",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"typecheck": "tsc"
},
Expand Down

0 comments on commit 7a190a5

Please sign in to comment.