-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from silvereennetwork/main
ergre
- Loading branch information
Showing
429 changed files
with
4,788 additions
and
1,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use the official Node.js 16 image as a base | ||
FROM node:16 | ||
|
||
# Create and set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (if available) | ||
COPY package.json package-lock.json* ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of your application's code | ||
COPY . . | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 8000 | ||
|
||
# Command to run your app | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module.exports = { | ||
apps: [ | ||
{ | ||
name: 'index-app', // Name of the application for index.js | ||
script: './index.js', // Script to run | ||
cwd: './', // Current working directory | ||
exec_mode: 'fork', // Fork mode | ||
wait_ready: true, // Wait until the process sends a ready signal | ||
}, | ||
{ | ||
name: 'update-app', // Name of the application for update.js | ||
script: './update.js', // Script to run | ||
cwd: './', // Current working directory | ||
exec_mode: 'fork', // Fork mode | ||
wait_ready: true, // Wait until the process sends a ready signal | ||
}, | ||
], | ||
|
||
deploy: { | ||
production: { | ||
user: 'node', // SSH user | ||
host: 'your-server-address',// SSH host | ||
ref: 'origin/main', // Git branch to deploy | ||
repo: '[email protected]:repo.git', // Repository URL | ||
path: '/var/www/production', // Path on the server | ||
'post-deploy': 'npm install && pm2 start ecosystem.config.js --only index-app && pm2 start ecosystem.config.js --only update-app', // Commands to run after deploy | ||
}, | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.