- 🍔 Next.JS(React)
- 🥯 ISR(On-demand Revalidation)
- 🥪 TypeScript
- 🍟 Prisma(MySQL)
- 🍣 Docker
![]() Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
---|---|---|---|
Edge | last 2 versions | last 2 versions | last 2 versions |
# MYSQL
DATABASE_URL = mysql://root:xxx@@localhost:3306/website
# JWT SECRET
SECRET = xxx
# Next.js <Image/> component loading address prefix
# https://nextjs.org/docs/app/api-reference/components/image#remotepatterns
NEXT_PUBLIC_IMAGE_BASE_URL = http://127.0.0.1:3000
# 注:npx prisma db push 是 Prisma初始化数据库表的命令,开发环境仅需运行一次
$ git clone https://github.com/world56/website.git
$ cd website
$ npm install
$ npx prisma db push
$ npm run dev
打开浏览器访问 http://127.0.0.1:3000
# 注:docker run 命令需要根据实际情况自行调整 数据卷、环境变量等参数。
$ npm run build
$ docker build -t website:0.1 .
$ docker run -d -p 1000:3000 --name website -v ~/app/website/resource:/app/resource -e DATABASE_URL=mysql://root:xxx@@localhost:3306/website -e SECRET=xxx -e NEXT_PUBLIC_IMAGE_BASE_URL=http://192.168.xx.xxx website:0.1
# 注:默认您已全局安装pm2
$ npm run build
$ pm2 start pm2.json
本项目UI灵感来源于@codewithsadee,和他优秀的开源项目 vcard-personal-portfolio,感谢他的付出与开源精神。
The UI inspiration for this project come from @codewithsadee and his outstanding open-source project vcard-personal-portfolio. Grateful for his dedication and open-source spirit.