generated from gitcommitshow/github-app-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae6062c
commit 98fcefe
Showing
5 changed files
with
71 additions
and
3 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,29 @@ | ||
# Use an official Node.js 20 runtime as a parent image | ||
FROM node:20 | ||
|
||
# Create and set the working directory | ||
RUN mkdir -p /home/node/rudder-github-app && chown -R node:node /home/node/rudder-github-app | ||
|
||
# Set the working directory in the container | ||
WORKDIR /home/node/rudder-github-app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies using npm ci | ||
RUN npm ci --no-audit --cache .npm | ||
|
||
# Copy the rest of the application code to the working directory | ||
COPY . . | ||
|
||
# Change ownership of the copied files to the node user | ||
RUN chown -R node:node /home/node/rudder-github-app | ||
|
||
# Switch to the node user | ||
USER node | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Start the app using npm start | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- NODE_ENV=production | ||
- PORT=3000 | ||
- APP_ID=123456 # Update with your GitHub app ID | ||
- GITHUB_APP_PRIVATE_KEY_BASE64=LS0tHL.....o= # Update with your GitHub app private key (base64 encoded) | ||
- WEBHOOK_SECRET=webhooksecret # Update with your GitHub webhook secretset in your GitHub app | ||
- WEBSITE_ADDRESS=http://localhost:3000 # Update with your public website address | ||
|
||
# To enable live code changes during development, attach current directory as volume | ||
# volumes: | ||
# - .:/home/node/rudder-github-app |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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