Updates
This commit is contained in:
parent
045c849697
commit
35e8970944
@ -2,15 +2,8 @@
|
||||
|
||||
cd /app
|
||||
|
||||
rm -rf /app/node_modules
|
||||
rm -rf /app/.next
|
||||
|
||||
bun install
|
||||
npm rebuild better-sqlite3
|
||||
|
||||
bun twui:add
|
||||
bun twui:init
|
||||
bun twui:update
|
||||
chmod +x init.sh
|
||||
./init.sh
|
||||
|
||||
if [ $NODE_ENV = "production" ]; then
|
||||
echo "Production Environment"
|
||||
|
||||
11
package.json
11
package.json
@ -3,18 +3,19 @@
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"pm2:dev": "pm2 start --name turboci-web 'bunx next dev' && pm2 start --name turboci-cron 'bun --watch src/cron/index.ts'",
|
||||
"pm2:start": "pm2 start --name turboci-web 'bunx next start' && pm2 start --name turboci-cron 'bun src/cron/index.ts'",
|
||||
"dev": "next dev -p 3772",
|
||||
"pm2:dev": "./src/scripts/shell/start-dev.sh",
|
||||
"pm2:start": "./src/scripts/shell/start-prod.sh",
|
||||
"pm2:kill": "pm2 kill",
|
||||
"twui:init": "git submodule update twui --init",
|
||||
"twui:init": "git submodule update --init twui",
|
||||
"twui:update": "git submodule update --remote",
|
||||
"twui:add": "git submodule add https://git.tben.me/Moduletrace/tailwind-ui-library.git twui",
|
||||
"db:schema": "bunx bun-sqlite schema -t",
|
||||
"db:schema": "bunx nsqlite schema -t",
|
||||
"docker:start": "docker compose down && docker compose up --build -d",
|
||||
"docker:logs": "docker compose logs -f -n 50",
|
||||
"rebuild:better-sqlite3": "npm rebuild better-sqlite3",
|
||||
"chown:root-dir": "sudo chown -R archben:archben .",
|
||||
"git:push": "git add . && git commit -m 'Updates' && git push",
|
||||
"build": "next build"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
13
src/scripts/shell/init.sh
Executable file
13
src/scripts/shell/init.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf /app/node_modules
|
||||
rm -rf /app/.next
|
||||
|
||||
bun install
|
||||
npm rebuild better-sqlite3
|
||||
|
||||
bun twui:add || echo "TWUI Already Added"
|
||||
bun twui:init || echo "TWUI Already Initialized"
|
||||
bun twui:update
|
||||
|
||||
bunx nsqlite schema -t
|
||||
5
src/scripts/shell/start-dev.sh
Executable file
5
src/scripts/shell/start-dev.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
pm2 start --name turboci-web 'bunx next dev -p 3772'
|
||||
pm2 start --name turboci-cron 'bun --watch src/cron/index.ts'
|
||||
pm2 start --name turboci-websocket 'bun --watch src/websocket/index.ts'
|
||||
5
src/scripts/shell/start-prod.sh
Executable file
5
src/scripts/shell/start-prod.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
pm2 start --name turboci-web 'bunx next start -p 3772'
|
||||
pm2 start --name turboci-cron 'bun src/cron/index.ts'
|
||||
pm2 start --name turboci-websocket 'bun src/websocket/index.ts'
|
||||
Loading…
Reference in New Issue
Block a user