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

Commit 7327a69

Browse files
authored
Update v4 - Merge pre-push to main (#71)
* 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
1 parent d67771c commit 7327a69

File tree

119 files changed

+7708
-5964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+7708
-5964
lines changed

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ API_KEY="this API key is used for schedules and manga page. get the key from htt
1414
DISQUS_SHORTNAME='put your disqus shortname here. (optional)'
1515

1616
## Prisma
17-
DATABASE_URL="Your postgresql connection url"
17+
DATABASE_URL="Your postgresql connection url"
18+
19+
## Redis
20+
# If you don't want to use redis, just comment the REDIS_URL
21+
REDIS_URL="rediss://username:password@host:port"

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: "[Enhancements] Your Title Here"
4+
title: "[Enhancements]"
55
labels: enhancement
66
assignees: ''
77

.github/workflows/build-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-test-job:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 18
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build the Next.js app
25+
run: npm run build

.github/workflows/main.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- "release.md"
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 18
23+
24+
- name: Get version from package.json
25+
id: app-version
26+
uses: martinbeentjes/[email protected]
27+
28+
- name: Create Release
29+
id: create_release
30+
uses: actions/create-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
tag_name: v${{ steps.app-version.outputs.current-version}}
35+
release_name: Moopa v${{ steps.app-version.outputs.current-version}}
36+
body_path: "release.md"
37+
draft: false
38+
prerelease: false

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@
1818
# production
1919
/build
2020

21+
# docker
22+
docker-compose.yml
23+
2124
# misc
2225
.DS_Store
2326
*.pem
27+
/assets/dummyData.json
28+
/backup
2429

2530
# debug
2631
npm-debug.log*
@@ -43,4 +48,5 @@ service-account.json
4348
**/public/worker-*.js
4449
**/public/sw.js.map
4550
**/public/workbox-*.js.map
46-
**/public/worker-*.js.map
51+
**/public/worker-*.js.map
52+
**/public/fallback-*.js

Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ RUN npm run build
1717
FROM base AS runner
1818
ENV NEXT_TELEMETRY_DISABLED 1
1919
WORKDIR /app
20-
RUN addgroup --system --gid 1001 nodejs; \
21-
adduser --system --uid 1001 nextjs
2220
COPY --from=builder /app/public ./public
23-
COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
24-
COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static
25-
USER nextjs
21+
COPY --from=builder /app/.next/standalone ./
22+
COPY --from=builder /app/.next/static ./.next/static
23+
24+
# DB Initialization: Experimental
25+
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
26+
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
27+
COPY --from=builder /app/prisma ./prisma
28+
29+
# USER nextjs
2630
EXPOSE 3000
27-
CMD ["node", "server.js"]
31+
CMD npx prisma migrate deploy; npx prisma generate; node server.js

0 commit comments

Comments
 (0)