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

Commit

Permalink
Update v4 - Merge pre-push to main (#71)
Browse files Browse the repository at this point in the history
* Create build-test.yml

* initial v4 commit

* update: github workflow

* update: push on branch

* Update .github/ISSUE_TEMPLATE/bug_report.md

* configuring next.config.js file
  • Loading branch information
DevanAbinaya authored Sep 12, 2023
1 parent d67771c commit 7327a69
Show file tree
Hide file tree
Showing 119 changed files with 7,708 additions and 5,964 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/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
25 changes: 25 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Test

on:
pull_request:
branches:
- main

jobs:
build-test-job:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: npm install

- name: Build the Next.js app
run: npm run build
31 changes: 0 additions & 31 deletions .github/workflows/main.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create Release

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "release.md"

jobs:
create-release:
runs-on: ubuntu-latest

steps:
- 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 Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.app-version.outputs.current-version}}
release_name: Moopa v${{ steps.app-version.outputs.current-version}}
body_path: "release.md"
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 7327a69

Please sign in to comment.