Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxprilutskiy committed Sep 2, 2024
1 parent 48f2a21 commit 0216f9d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
18 changes: 8 additions & 10 deletions action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
FROM node:14
FROM node:20.12.2-alpine

# Create and change to the app directory
# Set working directory
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json ./
# Copy necessary files
COPY package*.json index.mjs entrypoint.sh ./

# Install dependencies
RUN npm install
# Install pnpm and dependencies
RUN npm install -g pnpm && pnpm install

# Copy the rest of the application code
COPY . .

# Run the entrypoint script
# Make entrypoint.sh executable and set as entrypoint
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]
13 changes: 8 additions & 5 deletions action/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/sh -l
#!/bin/sh

# Install dependencies
npm install
# Exit immediately if a command exits with a non-zero status
set -e

# Execute the main script
node index.mjs
# Print all executed commands to the terminal
set -x

# Start the Node.js application
exec node index.mjs

0 comments on commit 0216f9d

Please sign in to comment.