"feat: add mobile app support with Dockerfile and dev/build scripts, update all projects to use psmisc for process management"

This commit is contained in:
louiscklaw
2025-06-16 01:46:15 +08:00
parent a686dd55dd
commit cf5cfb8d63
10 changed files with 38 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ RUN npm install -g pnpm
RUN apt-get update -y
RUN apt-get install -y openssl
RUN apt-get install -qqy psmisc
# Set working directory
WORKDIR /app

View File

@@ -10,6 +10,9 @@ while true; do
npx nodemon --ext ts,tsx,prisma --exec "yarn db:push && yarn seed && yarn dev"
# yarn dev
killall node
killall yarn
echo "restarting..."
sleep 1
done

View File

@@ -2,6 +2,8 @@
set -x
killall node
killall yarn
rm -rf ./**/*Zone.Identifier
# yarn db:push

View File

@@ -6,6 +6,7 @@ set -ex
DOCKER_COMPOSE_FILES=" -f docker-compose.yml -f docker-compose.dev.yml"
# docker compose $DOCKER_COMPOSE_FILES build
# docker compose $DOCKER_COMPOSE_FILES push
docker compose $DOCKER_COMPOSE_FILES up -d
# cd ../api_server

View File

@@ -3,6 +3,8 @@ FROM node:20-slim
# Install pnpm globally
RUN npm install -g pnpm
RUN apt-get update
RUN apt-get install -qqy psmisc
# Set working directory
WORKDIR /app

View File

@@ -10,6 +10,9 @@ while true; do
yarn dev --force --clearScreen
killall node
killall yarn
echo "restarting..."
sleep 1
done

View File

@@ -2,6 +2,8 @@
set -x
killall node
killall yarn
rm -rf ./**/*Zone.Identifier
set -ex

View File

@@ -0,0 +1,17 @@
# Use official Node 18 base image
FROM node:20-slim
# Install pnpm globally
# RUN npm install -g pnpm
RUN apt update
RUN apt-get install -qqy psmisc
# Set working directory
WORKDIR /app
# Copy your application code (optional, comment out if not needed)
# COPY . /app
# RUN yarn
# Default command (optional)
CMD ["npm run start"]

View File

@@ -7,6 +7,9 @@ clear
while true; do
npm run dev
killall node
killall yarn
echo "restarting..."
sleep 1
done

View File

@@ -2,10 +2,12 @@
set -x
npm i -D
killall node
killall yarn
rm -rf ./**/*Zone.Identifier
npm i -D
set -ex
npm run format