-
Notifications
You must be signed in to change notification settings - Fork 48
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
Showing
44 changed files
with
1,897 additions
and
153 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,4 @@ | ||
node_modules/ | ||
.next/ | ||
.env | ||
.env.local |
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 @@ | ||
name: PR Comment | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
add_comment: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add a "Thank you" comment to new PR | ||
uses: actions-ecosystem/action-add-comment@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
issue_number: ${{ github.event.pull_request.number }} | ||
comment: '🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer from DearDiary team will review it as soon as possible. We appreciate your support in making this project better.' |
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env.example | ||
|
||
# vercel | ||
.vercel | ||
|
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 image as the base image | ||
FROM node:18-alpine | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json first | ||
COPY package*.json ./ | ||
|
||
# Set NODE_ENV to development for the build process | ||
ENV NODE_ENV=development | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Expose the Next.js default port | ||
EXPOSE 3000 | ||
|
||
# Start the Next.js app | ||
CMD ["npm", "run", "dev"] |
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
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,31 @@ | ||
version: "3.8" | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
DATABASE_URL: ${DATABASE_URL} | ||
ports: | ||
- "3000:3000" | ||
- "5555:5555" # Forward Prisma Studio port to host machine | ||
|
||
env_file: | ||
- .env # Load environment variables from .env | ||
depends_on: | ||
- db | ||
|
||
db: | ||
image: postgres:14-alpine | ||
restart: always | ||
environment: | ||
POSTGRES_USER: user | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: mydatabase | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
|
||
volumes: | ||
postgres_data: |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"jsx": "react", | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
// next.config.mjs | ||
|
||
export default nextConfig; | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
async rewrites() { | ||
return [ | ||
{ | ||
source: '/api/quote', | ||
destination: 'https://zenquotes.io/api/random', | ||
}, | ||
] | ||
}, | ||
} | ||
|
||
export default nextConfig; | ||
|
Oops, something went wrong.