Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
initial v4 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DevanAbinaya committed Sep 12, 2023
1 parent 95a1bd0 commit 701798a
Show file tree
Hide file tree
Showing 117 changed files with 7,608 additions and 5,946 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ API_KEY="this API key is used for schedules and manga page. get the key from htt
DISQUS_SHORTNAME='put your disqus shortname here. (optional)'

## Prisma
DATABASE_URL="Your postgresql connection url"
DATABASE_URL="Your postgresql connection url"

## Redis
# If you don't want to use redis, just comment the REDIS_URL
REDIS_URL="rediss://username:password@host:port"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug] Your Title Here"
title: "[BUG]"
labels: "\U0001F41B bug"
assignees: ''

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Enhancements] Your Title Here"
title: "[Enhancements]"
labels: enhancement
assignees: ''

Expand Down
43 changes: 25 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
name: Create Release on Version Update
name: Build and Release

on:
push:
branches:
- main
permissions:
contents: write

jobs:
create_release:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Check commit message and version
id: check_version
run: |
commit_message=$(git log -1 --pretty=format:%s)
version=$(echo $commit_message | grep -o -E "v[0-9]+\.[0-9]+\.[0-9]+" || true)
echo "Version found in commit message: $version"
echo "::set-output name=version::$version"
shell: bash
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18

- name: Get version from package.json
id: app-version
uses: martinbeentjes/[email protected]

- name: Create Changelog
id: changelog
run: echo "CHANGELOG=$(git log --format='- %s' ${{ github.event.before }}..${{ github.sha }})" >> $GITHUB_ENV

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create-release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.check_version.outputs.version }}
release_name: Release ${{ steps.check_version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog.outputs.changelog }}
tag_name: v${{ steps.app-version.outputs.current-version}}
name: Release v${{ steps.app-version.outputs.current-version}}
draft: false
prerelease: false
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
# production
/build

# docker
docker-compose.yml

# misc
.DS_Store
*.pem
/assets/dummyData.json
/backup

# debug
npm-debug.log*
Expand All @@ -43,4 +48,5 @@ service-account.json
**/public/worker-*.js
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map
**/public/worker-*.js.map
**/public/fallback-*.js
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ RUN npm run build
FROM base AS runner
ENV NEXT_TELEMETRY_DISABLED 1
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs; \
adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static
USER nextjs
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static

# DB Initialization: Experimental
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/prisma ./prisma

# USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]
CMD npx prisma migrate deploy; npx prisma generate; node server.js
Loading

0 comments on commit 701798a

Please sign in to comment.