-
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
5ab1613
commit 6dd3d28
Showing
5 changed files
with
151 additions
and
0 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,39 @@ | ||
# Node modules should not be copied to the Docker image as they are re-installed during the build process. | ||
node_modules | ||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
|
||
# Exclude the local environment variables | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# Output directories | ||
dist | ||
build | ||
|
||
# Exclude Dockerfile and Docker ignore file itself | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore any git-related files | ||
.git | ||
.gitignore | ||
|
||
# Exclude local development files and tools | ||
.vscode | ||
.idea | ||
*.swp | ||
|
||
# OS generated files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Logs and temporary files | ||
*.log | ||
*.tmp | ||
|
||
# netlfiy configs | ||
netlfiy.toml | ||
|
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,44 @@ | ||
name: User App Docker Build and Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/apekade_user:latest | ||
- | ||
name: Add build summary | ||
run: | | ||
echo '### 🚀 Docker Build and Push Summary' > $GITHUB_STEP_SUMMARY | ||
echo '' >> $GITHUB_STEP_SUMMARY | ||
echo '🔧 **Build Status**: The Docker image has been successfully built and pushed.' >> $GITHUB_STEP_SUMMARY | ||
echo '' >> $GITHUB_STEP_SUMMARY | ||
echo '🛠️ **Build Context**: .' >> $GITHUB_STEP_SUMMARY | ||
echo '📦 **Image Tag**: ${{ secrets.DOCKERHUB_USERNAME }}/apekade_admin:latest' >> $GITHUB_STEP_SUMMARY | ||
echo '' >> $GITHUB_STEP_SUMMARY | ||
echo '🎉 **Thanks for using GitHub Actions!**' >> $GITHUB_STEP_SUMMARY |
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,41 @@ | ||
name: Review | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
pull_request_target: | ||
types: [opened] | ||
|
||
jobs: | ||
review: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Add Summary for reviews | ||
run: echo '### reviews Workflow Summary 🚀' > $GITHUB_STEP_SUMMARY | ||
|
||
- name: Post review message for issues | ||
if: github.event_name == 'issues' | ||
run: | | ||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
--request POST \ | ||
--data '{"body":"👋 Thank you for opening this issue! We will get back to you shortly."}' \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments | ||
echo 'Issue review message posted.' >> $GITHUB_STEP_SUMMARY | ||
- name: Post review message for pull requests | ||
if: github.event_name == 'pull_request_target' | ||
run: | | ||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
--request POST \ | ||
--data '{"body":"🎉 Thank you for this pull request! We will review it as soon as possible."}' \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments | ||
echo 'Pull request review message posted.' >> $GITHUB_STEP_SUMMARY |
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,23 @@ | ||
# Use an official Node.js runtime as a parent image | ||
FROM node:20-alpine | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json package-lock.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application files | ||
COPY . . | ||
|
||
# Build the app | ||
RUN npm run build | ||
|
||
# Expose port 5757 | ||
EXPOSE 5757 | ||
|
||
# Start nginx | ||
CMD ["npm","run","preview"] |
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